Skip to content

Commit

Permalink
guard use of dilithium_key->params on WC implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
bigbrett committed Nov 12, 2024
1 parent 0e6ac11 commit 6b1b6ec
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions wolfcrypt/src/dilithium.c
Original file line number Diff line number Diff line change
Expand Up @@ -9614,9 +9614,9 @@ int wc_Dilithium_PrivateKeyDecode(const byte* input, word32* inOutIdx,
}

/* If expected security level not set in key, detect it from DER */
if (key->level == 0 || key->params == NULL
#ifdef WOLFSSL_DILITHIUM_FIPS204_DRAFT
|| key->params->level == 0)
if (key->level == 0
#ifdef WOLFSSL_WC_DILITHIUM
|| key->params == NULL
#endif
) {
int level;
Expand Down Expand Up @@ -9885,9 +9885,9 @@ int wc_Dilithium_PublicKeyDecode(const byte* input, word32* inOutIdx,

#if !defined(WOLFSSL_DILITHIUM_NO_ASN1)
/* If expected security level not set in key, detect it from DER */
if (key->level == 0 || key->params == NULL
#ifdef WOLFSSL_DILITHIUM_FIPS204_DRAFT
|| key->params->level == 0)
if (key->level == 0
#ifdef WOLFSSL_WC_DILITHIUM
|| key->params == NULL
#endif
) {
int level;
Expand Down

0 comments on commit 6b1b6ec

Please sign in to comment.