From 86a3039e0bc2a57b11dc3fee9298c7041c5d21dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moise=CC=81s=20Guimara=CC=83es?= Date: Mon, 9 Jan 2017 16:43:31 -0200 Subject: [PATCH] fixes CA matching when using NO_SKID --- wolfcrypt/src/asn.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 32f355455..2c8e67492 100755 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -9690,7 +9690,13 @@ static int DecodeBasicOcspResponse(byte* source, word32* ioIndex, } } else { - Signer* ca = GetCA(cm, resp->issuerKeyHash); + Signer* ca = NULL; + + #ifndef NO_SKID + ca = GetCA(cm, resp->issuerKeyHash); + #else + ca = GetCA(cm, resp->issuerHash); + #endif if (!ca || !ConfirmSignature(resp->response, resp->responseSz, ca->publicKey, ca->pubKeySize, ca->keyOID,