From ec60d88f822d156cb89155da27d36c238e3dae69 Mon Sep 17 00:00:00 2001 From: Ruby Martin Date: Wed, 5 Nov 2025 15:28:14 -0700 Subject: [PATCH] remove deadcode else statement when computing kid_type --- wolfcrypt/src/asn.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 8ea0b2d1a..f6124f075 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -34201,7 +34201,7 @@ static int SetKeyIdFromPublicKey(Cert *cert, RsaKey *rsakey, ecc_key *eckey, cert->skidSz = KEYID_SIZE; #endif } - else if (kid_type == AKID_TYPE) { + else { int hashId = HashIdAlg((word32)cert->sigType); ret = CalcHashId_ex(buf, (word32)bufferSz, cert->akid, hashId); #if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3) @@ -34210,8 +34210,6 @@ static int SetKeyIdFromPublicKey(Cert *cert, RsaKey *rsakey, ecc_key *eckey, cert->akidSz = KEYID_SIZE; #endif } - else - ret = BAD_FUNC_ARG; XFREE(buf, cert->heap, DYNAMIC_TYPE_TMP_BUFFER); return ret;