mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 03:42:40 +00:00
Unit tests fixes.
A PHPDoc fix
This commit is contained in:
parent
508f04fab8
commit
c6020a4c42
@ -2288,7 +2288,7 @@ class X509
|
|||||||
*
|
*
|
||||||
* @param string $date in format date('D, d M Y H:i:s O')
|
* @param string $date in format date('D, d M Y H:i:s O')
|
||||||
* @access private
|
* @access private
|
||||||
* @return array
|
* @return array|Element
|
||||||
*/
|
*/
|
||||||
private function timeField($date)
|
private function timeField($date)
|
||||||
{
|
{
|
||||||
@ -3432,7 +3432,7 @@ class X509
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
default: // Should be a key object (i.e.: \phpseclib\Crypt\RSA).
|
default: // Should be a key object (i.e.: \phpseclib\Crypt\RSA).
|
||||||
$key = $key->getPublicKey('PKCS1');
|
$key = $key->getPublicKey();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,14 +78,7 @@ class Unit_Crypt_BlowfishTest extends PhpseclibTestCase
|
|||||||
$bf->setKey($key);
|
$bf->setKey($key);
|
||||||
$bf->setIV(str_repeat("\0", $bf->getBlockLength() >> 3));
|
$bf->setIV(str_repeat("\0", $bf->getBlockLength() >> 3));
|
||||||
|
|
||||||
$engines = array(
|
if (!$bf->isValidEngine($engine)) {
|
||||||
'PHP'=>\phpseclib\Crypt\Common\SymmetricKey::ENGINE_INTERNAL,
|
|
||||||
'Eval'=>\phpseclib\Crypt\Common\SymmetricKey::ENGINE_EVAL,
|
|
||||||
'mcrypt'=>\phpseclib\Crypt\Common\SymmetricKey::ENGINE_MCRYPT,
|
|
||||||
'OpenSSL'=>\phpseclib\Crypt\Common\SymmetricKey::ENGINE_OPENSSL,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!$bf->isValidEngine($engines[$engine])) {
|
|
||||||
self::markTestSkipped("Unable to initialize $engine engine");
|
self::markTestSkipped("Unable to initialize $engine engine");
|
||||||
}
|
}
|
||||||
$bf->setPreferredEngine($engine);
|
$bf->setPreferredEngine($engine);
|
||||||
|
@ -29,7 +29,7 @@ class Unit_Crypt_TwofishTest extends PhpseclibTestCase
|
|||||||
$key = pack('H*', '00000000000000000000000000000000');
|
$key = pack('H*', '00000000000000000000000000000000');
|
||||||
$tf->setKey($key);
|
$tf->setKey($key);
|
||||||
if (!$tf->isValidEngine($engine)) {
|
if (!$tf->isValidEngine($engine)) {
|
||||||
self::markTestSkipped('Unable to initialize $engine engine');
|
self::markTestSkipped("Unable to initialize $engine engine");
|
||||||
}
|
}
|
||||||
|
|
||||||
$plaintext = pack('H*', '00000000000000000000000000000000');
|
$plaintext = pack('H*', '00000000000000000000000000000000');
|
||||||
|
Loading…
Reference in New Issue
Block a user