diff --git a/tests/api/test_dsa.c b/tests/api/test_dsa.c index f66c7dc34c..794abbadd2 100644 --- a/tests/api/test_dsa.c +++ b/tests/api/test_dsa.c @@ -591,7 +591,8 @@ int test_wc_DsaCheckPubKey(void) { EXPECT_DECLS; #if !defined(NO_DSA) && !defined(WC_FIPS_186_5_PLUS) && \ - !defined(HAVE_SELFTEST) && !defined(HAVE_FIPS) && defined(WOLFSSL_PUBLIC_MP) + !defined(HAVE_SELFTEST) && !defined(HAVE_FIPS) && defined(WOLFSSL_PUBLIC_MP) \ + && !defined(NO_DSA_PUBKEY_CHECK) DsaKey key; int answer = -1; int ret; diff --git a/wolfcrypt/src/dsa.c b/wolfcrypt/src/dsa.c index e806f7f6b9..0e849c2349 100644 --- a/wolfcrypt/src/dsa.c +++ b/wolfcrypt/src/dsa.c @@ -114,6 +114,7 @@ void wc_FreeDsaKey(DsaKey* key) * return 0 on success, BAD_FUNC_ARG when the key fails validation, or a * negative error code on internal failure. */ +#ifndef NO_DSA_PUBKEY_CHECK int wc_DsaCheckPubKey(DsaKey* key) { int err = MP_OKAY; @@ -189,6 +190,7 @@ int wc_DsaCheckPubKey(DsaKey* key) return err; } +#endif /* !NO_DSA_PUBKEY_CHECK */ /* validate that (L,N) match allowed sizes from FIPS 186-4, Section 4.2. * modLen - represents L, the size of p (prime modulus) in bits