CertID Construction
CertID ::= SEQUENCE {
hashAlgorithm AlgorithmIdentifier, -- typically SHA-1 (RFC 6960)
issuerNameHash OCTET STRING, -- Hash(issuer DN)
issuerKeyHash OCTET STRING, -- Hash(issuer public key bit string)
serialNumber CertificateSerialNumber
}
issuerNameHash = SHA-1 of the issuer's subject DN (DER-encoded)
issuerKeyHash = SHA-1 of the issuer's subjectPublicKey bit string (without tag/length)
serialNumber = the cert's serial number (from TBSCertificate)
You need both the cert and its issuer cert to construct a CertID.