mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-12 16:36:30 +00:00
Merge branch '3.0'
This commit is contained in:
commit
cb49bd3fb2
15
CHANGELOG.md
15
CHANGELOG.md
@ -1,5 +1,14 @@
|
||||
# Changelog
|
||||
|
||||
## 3.0.19 - 2023-03-05
|
||||
|
||||
- AsymmetricKey: error out on unsupported operations (#1879)
|
||||
- Blowfish: fix issues on 32-bit PHP installs
|
||||
- BigInteger: fix for hex numbers with new lines in them
|
||||
- SFTP: fix "Creating default object from empty value" error (#1876)
|
||||
- SSH2: add getTimeout() method (#1889)
|
||||
- PrimeField: prevent infinite loop with composite primefields (CVE-2023-27560)
|
||||
|
||||
## 3.0.18 - 2022-12-17
|
||||
|
||||
- fix for PHP 8.2 deprecations (#1869, #1873)
|
||||
@ -171,6 +180,12 @@
|
||||
- Salsa20 / ChaCha20
|
||||
- namespace changed from `phpseclib\` to `\phpseclib3` to facilitate phpseclib 2 shim (phpseclib2_compat)
|
||||
|
||||
## 2.0.42 - 2023-03-06
|
||||
|
||||
- Blowfish: fix issues on 32-bit PHP installs
|
||||
- BigInteger: fix for hex numbers with new lines in them
|
||||
- SSH2: add getTimeout() method (#1889)
|
||||
|
||||
## 2.0.41 - 2022-12-23
|
||||
|
||||
- fix for more PHP 8.2 deprecations (#1875)
|
||||
|
23
tests/Unit/Math/PrimeFieldTest.php
Normal file
23
tests/Unit/Math/PrimeFieldTest.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace phpseclib3\Tests\Unit\Math;
|
||||
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Math\PrimeField;
|
||||
use phpseclib3\Tests\PhpseclibTestCase;
|
||||
|
||||
class PrimeFieldTest extends PhpseclibTestCase
|
||||
{
|
||||
public function testPrimeFieldWithCompositeNumbers()
|
||||
{
|
||||
$this->expectException('UnexpectedValueException');
|
||||
|
||||
$a = new BigInteger('65', 10);
|
||||
$p = new BigInteger('126', 10); // 126 isn't a prime
|
||||
|
||||
$num = new PrimeField($p);
|
||||
$num2 = $num->newInteger($a);
|
||||
|
||||
echo $num2->squareRoot();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user