From 45703a8d72fca5b3aef1001c96775a3e28e8cf1c Mon Sep 17 00:00:00 2001 From: Tesfa Mael Date: Thu, 25 Apr 2019 10:51:42 -0700 Subject: [PATCH] handle OCSP verified certificate which is already loaded as CA --- wolfcrypt/src/asn.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index f869fa584..5a0e2c64c 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -8137,8 +8137,10 @@ 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->extSubjKeyIdSet) + if (cert->ca == NULL && cert->extSubjKeyIdSet \ + && verify != VERIFY_OCSP) { cert->ca = GetCA(cm, cert->extSubjKeyId); + } if (cert->ca == NULL) cert->ca = GetCAByName(cm, cert->issuerHash);