mirror of https://github.com/wolfSSL/wolfssl.git
Merge pull request #7862 from bigbrett/wc-test-nocryptocb
cryptocb test disable optionpull/7876/head
commit
14254e8a6e
|
@ -1877,6 +1877,10 @@ add_option("WOLFSSL_CRYPTOCB"
|
||||||
"Enable crypto callbacks (default: disabled)"
|
"Enable crypto callbacks (default: disabled)"
|
||||||
"no" "yes;no")
|
"no" "yes;no")
|
||||||
|
|
||||||
|
add_option("WOLFSSL_CRYPTOCB_NO_SW_TEST"
|
||||||
|
"Disable crypto callback SW testing (default: disabled)"
|
||||||
|
"no" "yes;no")
|
||||||
|
|
||||||
add_option("WOLFSSL_PKCALLBACKS"
|
add_option("WOLFSSL_PKCALLBACKS"
|
||||||
"Enable public key callbacks (default: disabled)"
|
"Enable public key callbacks (default: disabled)"
|
||||||
"no" "yes;no")
|
"no" "yes;no")
|
||||||
|
@ -2080,6 +2084,10 @@ if(WOLFSSL_CRYPTOCB)
|
||||||
list(APPEND WOLFSSL_DEFINITIONS "-DWOLF_CRYPTO_CB")
|
list(APPEND WOLFSSL_DEFINITIONS "-DWOLF_CRYPTO_CB")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(WOLFSSL_CRYPTOCB_NO_SW_TEST)
|
||||||
|
list(APPEND WOLFSSL_DEFINITIONS "-DWC_TEST_NO_CRYPTOCB_SW_TEST")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Public Key Callbacks
|
# Public Key Callbacks
|
||||||
if(WOLFSSL_PKCALLBACKS)
|
if(WOLFSSL_PKCALLBACKS)
|
||||||
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_PK_CALLBACKS")
|
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_PK_CALLBACKS")
|
||||||
|
|
18
configure.ac
18
configure.ac
|
@ -8475,6 +8475,19 @@ AC_ARG_ENABLE([cryptocb],
|
||||||
[ ENABLED_CRYPTOCB=no ]
|
[ ENABLED_CRYPTOCB=no ]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Enable testing of cryptoCb using software crypto. On platforms where wolfCrypt tests
|
||||||
|
# are used to test a custom cryptoCb, it may be desired to disable this so wolfCrypt tests
|
||||||
|
# don't also test software implementations of every algorithm
|
||||||
|
AC_ARG_ENABLE([cryptocb-sw-test],
|
||||||
|
[AS_HELP_STRING([--disable-cryptocb-sw-test],[Disable wolfCrypt crypto callback tests using software crypto (default: enabled). Only valid with --enable-cryptocb])],
|
||||||
|
[ if test "x$ENABLED_CRYPTOCB" = "xno"; then
|
||||||
|
AC_MSG_ERROR([--disable-cryptocb-sw-test requires --enable-cryptocb])
|
||||||
|
else
|
||||||
|
ENABLED_CRYPTOCB_SW_TEST=$enableval
|
||||||
|
fi ],
|
||||||
|
[ ENABLED_CRYPTOCB_SW_TEST=yes ]
|
||||||
|
)
|
||||||
|
|
||||||
if test "x$ENABLED_PKCS11" = "xyes" || test "x$ENABLED_WOLFTPM" = "xyes" || test "$ENABLED_CAAM" != "no"
|
if test "x$ENABLED_PKCS11" = "xyes" || test "x$ENABLED_WOLFTPM" = "xyes" || test "$ENABLED_CAAM" != "no"
|
||||||
then
|
then
|
||||||
ENABLED_CRYPTOCB=yes
|
ENABLED_CRYPTOCB=yes
|
||||||
|
@ -8484,6 +8497,11 @@ then
|
||||||
AM_CFLAGS="$AM_CFLAGS -DWOLF_CRYPTO_CB"
|
AM_CFLAGS="$AM_CFLAGS -DWOLF_CRYPTO_CB"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$ENABLED_CRYPTOCB_SW_TEST" = "no"
|
||||||
|
then
|
||||||
|
AM_CFLAGS="$AM_CFLAGS -DWC_TEST_NO_CRYPTOCB_SW_TEST"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Asynchronous Crypto
|
# Asynchronous Crypto
|
||||||
|
|
|
@ -735,7 +735,7 @@ void printOutput(const char *strName, unsigned char *data, unsigned int dataSz);
|
||||||
WOLFSSL_TEST_SUBROUTINE int ariagcm_test(MC_ALGID);
|
WOLFSSL_TEST_SUBROUTINE int ariagcm_test(MC_ALGID);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WOLF_CRYPTO_CB
|
#if defined(WOLF_CRYPTO_CB) && !defined(WC_TEST_NO_CRYPTOCB_SW_TEST)
|
||||||
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t cryptocb_test(void);
|
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t cryptocb_test(void);
|
||||||
#endif
|
#endif
|
||||||
#ifdef WOLFSSL_CERT_PIV
|
#ifdef WOLFSSL_CERT_PIV
|
||||||
|
@ -2321,7 +2321,7 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
|
||||||
TEST_PASS("blob test passed!\n");
|
TEST_PASS("blob test passed!\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(WOLF_CRYPTO_CB) && \
|
#if defined(WOLF_CRYPTO_CB) && !defined(WC_TEST_NO_CRYPTOCB_SW_TEST) && \
|
||||||
!(defined(HAVE_INTEL_QAT_SYNC) || defined(HAVE_CAVIUM_OCTEON_SYNC) || \
|
!(defined(HAVE_INTEL_QAT_SYNC) || defined(HAVE_CAVIUM_OCTEON_SYNC) || \
|
||||||
defined(WOLFSSL_QNX_CAAM) || defined(HAVE_RENESAS_SYNC))
|
defined(WOLFSSL_QNX_CAAM) || defined(HAVE_RENESAS_SYNC))
|
||||||
if ( (ret = cryptocb_test()) != 0)
|
if ( (ret = cryptocb_test()) != 0)
|
||||||
|
@ -55572,6 +55572,7 @@ static int myCryptoCbFind(int currentId, int algoType)
|
||||||
#endif /* WOLF_CRYPTO_CB_FIND */
|
#endif /* WOLF_CRYPTO_CB_FIND */
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(WC_TEST_NO_CRYPTOCB_SW_TEST)
|
||||||
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t cryptocb_test(void)
|
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t cryptocb_test(void)
|
||||||
{
|
{
|
||||||
wc_test_ret_t ret = 0;
|
wc_test_ret_t ret = 0;
|
||||||
|
@ -55700,6 +55701,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t cryptocb_test(void)
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif /* ! WC_TEST_NO_CRYPTOCB_SW_TEST */
|
||||||
#endif /* WOLF_CRYPTO_CB */
|
#endif /* WOLF_CRYPTO_CB */
|
||||||
|
|
||||||
#ifdef WOLFSSL_CERT_PIV
|
#ifdef WOLFSSL_CERT_PIV
|
||||||
|
|
Loading…
Reference in New Issue