Merge branch 'validation-1.0' into 2.0

This commit is contained in:
terrafrost 2017-12-14 06:34:32 -06:00
commit 45d6d0aa70

View File

@ -2161,7 +2161,7 @@ class X509
case !is_array($authorityKey): case !is_array($authorityKey):
case !$subjectKeyID: case !$subjectKeyID:
case isset($authorityKey['keyIdentifier']) && $authorityKey['keyIdentifier'] === $subjectKeyID: case isset($authorityKey['keyIdentifier']) && $authorityKey['keyIdentifier'] === $subjectKeyID:
if (is_array($authorityKey) && isset($authorityKey['authorityCertSerialNumber']) && $authorityKey['authorityCertSerialNumber'] != $ca['tbsCertificate']['serialNumber']) { if (is_array($authorityKey) && isset($authorityKey['authorityCertSerialNumber']) && !$authorityKey['authorityCertSerialNumber']->equals($ca['tbsCertificate']['serialNumber'])) {
break 2; // serial mismatch - check other ca break 2; // serial mismatch - check other ca
} }
$signingCert = $ca; // working cert $signingCert = $ca; // working cert
@ -2211,7 +2211,7 @@ class X509
case !is_array($authorityKey): case !is_array($authorityKey):
case !$subjectKeyID: case !$subjectKeyID:
case isset($authorityKey['keyIdentifier']) && $authorityKey['keyIdentifier'] === $subjectKeyID: case isset($authorityKey['keyIdentifier']) && $authorityKey['keyIdentifier'] === $subjectKeyID:
if (is_array($authorityKey) && isset($authorityKey['authorityCertSerialNumber']) && $authorityKey['authorityCertSerialNumber'] != $ca['tbsCertificate']['serialNumber']) { if (is_array($authorityKey) && isset($authorityKey['authorityCertSerialNumber']) && !$authorityKey['authorityCertSerialNumber']->equals($ca['tbsCertificate']['serialNumber'])) {
break 2; // serial mismatch - check other ca break 2; // serial mismatch - check other ca
} }
$signingCert = $ca; // working cert $signingCert = $ca; // working cert