Skip to content

Commit

Permalink
Dilithium: fix if ... else if with #ifdefs
Browse files Browse the repository at this point in the history
  • Loading branch information
SparkiDev committed Jul 24, 2024
1 parent 67491e6 commit 099728c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions wolfcrypt/src/dilithium.c
Original file line number Diff line number Diff line change
Expand Up @@ -8638,20 +8638,23 @@ int wc_Dilithium_PublicKeyDecode(const byte* input, word32* inOutIdx,
oid = dilithium_oid_44;
oidLen = (int)sizeof(dilithium_oid_44);
}
else
#endif
#ifndef WOLFSSL_NO_ML_DSA_65
else if (key->level == 3) {
if (key->level == 3) {
oid = dilithium_oid_65;
oidLen = (int)sizeof(dilithium_oid_65);
}
else
#endif
#ifndef WOLFSSL_NO_ML_DSA_87
else if (key->level == 5) {
if (key->level == 5) {
oid = dilithium_oid_87;
oidLen = (int)sizeof(dilithium_oid_87);
}
else
#endif
else {
{
/* Level not set. */
ret = BAD_FUNC_ARG;
}
Expand Down

0 comments on commit 099728c

Please sign in to comment.