From 413e3b36cbd9c660729a42187d17bae68809490c Mon Sep 17 00:00:00 2001 From: kaleb-himes Date: Thu, 7 Mar 2019 11:30:13 -0700 Subject: [PATCH] Edge case fix for AKID not set in CA and two CAs with same issuer line --- wolfcrypt/src/asn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 239e60ff8..28c0533fe 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -8079,6 +8079,8 @@ int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm) #ifndef NO_SKID if (cert->extAuthKeyIdSet) cert->ca = GetCA(cm, cert->extAuthKeyId); + if (cert->ca == NULL) + cert->ca = GetCA(cm, cert->extSubjKeyId); if (cert->ca == NULL) cert->ca = GetCAByName(cm, cert->issuerHash);