From 402ee291633b55bc67c75bd339e9744a171721ab Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Fri, 22 Oct 2021 16:53:18 -0600 Subject: [PATCH] fix nid2oid/oid2nid for oidCertAuthInfoType --- src/ssl.c | 8 ++++---- tests/api.c | 2 +- wolfcrypt/src/asn.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index b2b79c3bb..db8e83881 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -50716,9 +50716,9 @@ word32 nid2oid(int nid, int grp) /* oidCertAuthInfoType */ case oidCertAuthInfoType: switch (nid) { - case AIA_OCSP_OID: + case NID_ad_OCSP: return AIA_OCSP_OID; - case AIA_CA_ISSUER_OID: + case NID_ad_ca_issuers: return AIA_CA_ISSUER_OID; } break; @@ -51069,9 +51069,9 @@ int oid2nid(word32 oid, int grp) case oidCertAuthInfoType: switch (oid) { case AIA_OCSP_OID: - return AIA_OCSP_OID; + return NID_ad_OCSP; case AIA_CA_ISSUER_OID: - return AIA_CA_ISSUER_OID; + return NID_ad_ca_issuers; } break; diff --git a/tests/api.c b/tests/api.c index dadaca576..40f887a20 100644 --- a/tests/api.c +++ b/tests/api.c @@ -43795,7 +43795,7 @@ static void test_wolfSSL_X509V3_EXT(void) { #endif AssertNotNull(adObj = ad->method); /* Make sure nid is OCSP */ - AssertIntEQ(wolfSSL_OBJ_obj2nid(adObj), AIA_OCSP_OID); + AssertIntEQ(wolfSSL_OBJ_obj2nid(adObj), NID_ad_OCSP); /* GENERAL_NAME stores URI as an ASN1_STRING */ AssertNotNull(gn = ad->location); diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 4c6008b04..05d82c3da 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -14732,7 +14732,7 @@ static int DecodeAuthInfo(const byte* input, int sz, DecodedCert* cert) { cert->extAuthInfoSz = length; cert->extAuthInfo = input + idx; - #if defined(OPENSSL_ALL) && defined(WOLFSSL_QT) + #if defined(OPENSSL_ALL) || defined(WOLFSSL_QT) count++; #else break;