Skip to content

Commit

Permalink
Skip optional subject/issuer unique IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
mdehoog committed Dec 8, 2024
1 parent e94a3ec commit d0899d8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/CertManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ contract CertManager is ICertManager {
Asn1Ptr subjectPublicKeyInfoPtr = certificate.nextSiblingOf(subjectPtr);
Asn1Ptr extensionsPtr = certificate.nextSiblingOf(subjectPublicKeyInfoPtr);

if (certificate[extensionsPtr.header()] == 0x81) {
// skip optional issuerUniqueID
extensionsPtr = certificate.nextSiblingOf(extensionsPtr);
}
if (certificate[extensionsPtr.header()] == 0x82) {
// skip optional subjectUniqueID
extensionsPtr = certificate.nextSiblingOf(extensionsPtr);
}

notAfter = _verifyValidity(certificate, validityPtr);
maxPathLen = _verifyExtensions(certificate, extensionsPtr, clientCert);
pubKey = _parsePubKey(certificate, subjectPublicKeyInfoPtr);
Expand Down

0 comments on commit d0899d8

Please sign in to comment.