X509: serial numbers are biginteger's

This commit is contained in:
terrafrost 2017-12-14 06:22:55 -06:00
parent 247e969366
commit 36e9992508

View File

@ -2201,7 +2201,7 @@ class File_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
@ -2251,7 +2251,7 @@ class File_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