From fd01f79f864c23b9fb471a2bec6e8d6583e8679a Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Sun, 31 Jan 2021 23:43:53 +0700 Subject: [PATCH 1/2] add guard for rsa public only --- wolfcrypt/test/test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 7d3fffc39..fb0d030e3 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -13069,7 +13069,7 @@ done: #if defined(WC_RSA_PSS) && !defined(HAVE_FIPS_VERSION) /* not supported with FIPSv1 */ /* Need to create known good signatures to test with this. */ -#ifndef WOLFSSL_RSA_VERIFY_ONLY +#if !defined(WOLFSSL_RSA_VERIFY_ONLY) && !defined(WOLFSSL_RSA_PUBLIC_ONLY) static int rsa_pss_test(WC_RNG* rng, RsaKey* key) { byte digest[WC_MAX_DIGEST_SIZE]; @@ -15491,7 +15491,7 @@ WOLFSSL_TEST_SUBROUTINE int rsa_test(void) #if defined(WC_RSA_PSS) && !defined(HAVE_FIPS_VERSION) /* not supported with FIPSv1 */ /* Need to create known good signatures to test with this. */ -#ifndef WOLFSSL_RSA_VERIFY_ONLY +#if !defined(WOLFSSL_RSA_VERIFY_ONLY) && !defined(WOLFSSL_RSA_PUBLIC_ONLY) ret = rsa_pss_test(&rng, key); if (ret != 0) goto exit_rsa; From a7066a9be2ad695590bb1704b39a5990642b28b7 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Mon, 1 Feb 2021 23:07:03 +0700 Subject: [PATCH 2/2] add stdint to test.c if using non blocking ecc test --- wolfcrypt/test/test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index fb0d030e3..6cfc27651 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -44,6 +44,11 @@ #undef err_sys #endif +#if defined(WC_ECC_NONBLOCK) && defined(WOLFSSL_PUBLIC_MP) && \ + defined(HAVE_ECC_SIGN) && defined(HAVE_ECC_VERIFY) + #include +#endif + #if defined(HAVE_STACK_SIZE_VERBOSE) #ifdef WOLFSSL_TEST_MAX_RELATIVE_STACK_BYTES static ssize_t max_relative_stack = WOLFSSL_TEST_MAX_RELATIVE_STACK_BYTES;