From 76b48f8fc44eb3540d1cbe6ebc8849f3250d5789 Mon Sep 17 00:00:00 2001 From: Jeremiah Mackey Date: Fri, 8 May 2026 17:04:35 +0000 Subject: [PATCH] fix NO_VERIFY_OID build in GetOID --- wolfcrypt/src/asn.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 1d9882870f..ad7a078a2e 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -7609,9 +7609,9 @@ static int GetOID(const byte* input, word32* inOutIdx, word32* oid, { int ret = 0; word32 idx = *inOutIdx; -#ifndef NO_VERIFY_OID word32 actualOidSz; const byte* actualOid; +#ifndef NO_VERIFY_OID const byte* checkOid = NULL; word32 checkOidSz; #endif /* NO_VERIFY_OID */ @@ -7623,11 +7623,9 @@ static int GetOID(const byte* input, word32* inOutIdx, word32* oid, (void)oidType; *oid = 0; -#if !defined(NO_VERIFY_OID) || defined(WOLFSSL_FPKI) - /* Keep references to OID data and length for check. */ + /* Keep references to OID data and length for sum and (optional) check. */ actualOid = &input[idx]; actualOidSz = (word32)length; -#endif /* NO_VERIFY_OID */ *oid = wc_oid_sum(actualOid, (int)actualOidSz); idx += actualOidSz;