mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-10 07:40:58 +00:00
revert == instead ===
This commit is contained in:
parent
cc2c844d0e
commit
1e3e44e3c6
@ -260,7 +260,7 @@ class File_ASN1 {
|
|||||||
*/
|
*/
|
||||||
function decodeBER($encoded)
|
function decodeBER($encoded)
|
||||||
{
|
{
|
||||||
if (is_object($encoded) && strtolower(get_class($encoded)) === 'file_asn1_element') {
|
if (is_object($encoded) && strtolower(get_class($encoded)) == 'file_asn1_element') {
|
||||||
$encoded = $encoded->element;
|
$encoded = $encoded->element;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4011,7 +4011,7 @@ class File_X509 {
|
|||||||
return $this->computeKeyIdentifier($key['certificationRequestInfo']['subjectPKInfo']['subjectPublicKey'], $method);
|
return $this->computeKeyIdentifier($key['certificationRequestInfo']['subjectPKInfo']['subjectPublicKey'], $method);
|
||||||
case !is_object($key):
|
case !is_object($key):
|
||||||
return false;
|
return false;
|
||||||
case strtolower(get_class($key)) === 'file_asn1_element':
|
case strtolower(get_class($key)) == 'file_asn1_element':
|
||||||
$asn1 = new File_ASN1();
|
$asn1 = new File_ASN1();
|
||||||
$decoded = $asn1->decodeBER($cert); //TODO:undefined variable $cert
|
$decoded = $asn1->decodeBER($cert); //TODO:undefined variable $cert
|
||||||
if (empty($decoded)) {
|
if (empty($decoded)) {
|
||||||
@ -4019,7 +4019,7 @@ class File_X509 {
|
|||||||
}
|
}
|
||||||
$key = $asn1->asn1map($decoded[0], array('type' => FILE_ASN1_TYPE_BIT_STRING));
|
$key = $asn1->asn1map($decoded[0], array('type' => FILE_ASN1_TYPE_BIT_STRING));
|
||||||
break;
|
break;
|
||||||
case strtolower(get_class($key)) === 'file_x509':
|
case strtolower(get_class($key)) == 'file_x509':
|
||||||
if (isset($key->publicKey)) {
|
if (isset($key->publicKey)) {
|
||||||
return $this->computeKeyIdentifier($key->publicKey, $method);
|
return $this->computeKeyIdentifier($key->publicKey, $method);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user