mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 11:37:33 +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')
|
||||
* @access private
|
||||
* @return array
|
||||
* @return array|Element
|
||||
*/
|
||||
private function timeField($date)
|
||||
{
|
||||
@ -3432,7 +3432,7 @@ class X509
|
||||
}
|
||||
return false;
|
||||
default: // Should be a key object (i.e.: \phpseclib\Crypt\RSA).
|
||||
$key = $key->getPublicKey('PKCS1');
|
||||
$key = $key->getPublicKey();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -78,14 +78,7 @@ class Unit_Crypt_BlowfishTest extends PhpseclibTestCase
|
||||
$bf->setKey($key);
|
||||
$bf->setIV(str_repeat("\0", $bf->getBlockLength() >> 3));
|
||||
|
||||
$engines = array(
|
||||
'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])) {
|
||||
if (!$bf->isValidEngine($engine)) {
|
||||
self::markTestSkipped("Unable to initialize $engine engine");
|
||||
}
|
||||
$bf->setPreferredEngine($engine);
|
||||
|
@ -29,7 +29,7 @@ class Unit_Crypt_TwofishTest extends PhpseclibTestCase
|
||||
$key = pack('H*', '00000000000000000000000000000000');
|
||||
$tf->setKey($key);
|
||||
if (!$tf->isValidEngine($engine)) {
|
||||
self::markTestSkipped('Unable to initialize $engine engine');
|
||||
self::markTestSkipped("Unable to initialize $engine engine");
|
||||
}
|
||||
|
||||
$plaintext = pack('H*', '00000000000000000000000000000000');
|
||||
|
Loading…
Reference in New Issue
Block a user