Merge pull request #2686 from ejohnstown/crl-skid

Check name hash after matching AKID for CRL
This commit is contained in:
toddouska
2019-12-18 13:48:59 -08:00
committed by GitHub

View File

@ -16189,10 +16189,16 @@ int ParseCRL(DecodedCRL* dcrl, const byte* buff, word32 sz, void* cm)
if experiencing issues uncomment NO_SKID define in CRL section of
wolfssl/wolfcrypt/settings.h */
#ifndef NO_SKID
if (dcrl->extAuthKeyIdSet)
if (dcrl->extAuthKeyIdSet) {
ca = GetCA(cm, dcrl->extAuthKeyId); /* more unique than issuerHash */
if (ca == NULL)
}
if (ca != NULL && XMEMCMP(dcrl->issuerHash, ca->subjectNameHash,
KEYID_SIZE) != 0) {
ca = NULL;
}
if (ca == NULL) {
ca = GetCAByName(cm, dcrl->issuerHash); /* last resort */
}
#else
ca = GetCA(cm, dcrl->issuerHash);
#endif /* !NO_SKID */