Skip to content

Commit ec60d88

Browse files
committed
remove deadcode else statement when computing kid_type
1 parent 9b2f7a3 commit ec60d88

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

wolfcrypt/src/asn.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34201,7 +34201,7 @@ static int SetKeyIdFromPublicKey(Cert *cert, RsaKey *rsakey, ecc_key *eckey,
3420134201
cert->skidSz = KEYID_SIZE;
3420234202
#endif
3420334203
}
34204-
else if (kid_type == AKID_TYPE) {
34204+
else {
3420534205
int hashId = HashIdAlg((word32)cert->sigType);
3420634206
ret = CalcHashId_ex(buf, (word32)bufferSz, cert->akid, hashId);
3420734207
#if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3)
@@ -34210,8 +34210,6 @@ static int SetKeyIdFromPublicKey(Cert *cert, RsaKey *rsakey, ecc_key *eckey,
3421034210
cert->akidSz = KEYID_SIZE;
3421134211
#endif
3421234212
}
34213-
else
34214-
ret = BAD_FUNC_ARG;
3421534213

3421634214
XFREE(buf, cert->heap, DYNAMIC_TYPE_TMP_BUFFER);
3421734215
return ret;

0 commit comments

Comments
 (0)