diff --git a/configure.ac b/configure.ac index 867a071f93..d64674a604 100644 --- a/configure.ac +++ b/configure.ac @@ -8915,7 +8915,7 @@ AC_ARG_WITH([sys-crypto-policy], ) if test "$SYS_CRYPTO_POLICY" != "no"; then - if test "$SYS_CRYPTO_POLICY" == "yes"; then + if test "$SYS_CRYPTO_POLICY" = "yes"; then # Default to the wolfssl fedora crypto-policy file. SYS_CRYPTO_POLICY="/etc/crypto-policies/back-ends/wolfssl.config" fi diff --git a/src/internal.c b/src/internal.c index ed114c5236..ecd1c5a2ee 100644 --- a/src/internal.c +++ b/src/internal.c @@ -27762,6 +27762,7 @@ static int ParseCipherList(Suites* suites, continue; } + #if defined(WOLFSSL_SYS_CRYPTO_POLICY) if (XSTRCMP(name, "AES128") == 0) { haveAES128 = allowing; callInitSuites = 1; @@ -27775,6 +27776,7 @@ static int ParseCipherList(Suites* suites, ret = 1; continue; } + #endif /* WOLFSSL_SYS_CRYPTO_POLICY */ if (XSTRCMP(name, "LOW") == 0 || XSTRCMP(name, "MEDIUM") == 0) { /* No way to limit or allow low bit sizes */ diff --git a/tests/api.c b/tests/api.c index 82c5771497..a103ac622f 100644 --- a/tests/api.c +++ b/tests/api.c @@ -91922,7 +91922,7 @@ static int test_wolfSSL_crypto_policy(void) { EXPECT_DECLS; #if defined(WOLFSSL_SYS_CRYPTO_POLICY) - int rc = WOLFSSL_FAILURE; + int rc = WC_NO_ERR_TRACE(WOLFSSL_FAILURE); const char * policy_list[] = { "examples/crypto_policies/legacy/wolfssl.txt", "examples/crypto_policies/default/wolfssl.txt", @@ -92044,7 +92044,7 @@ static int test_wolfSSL_crypto_policy_certs_and_keys(void) { EXPECT_DECLS; #if defined(WOLFSSL_SYS_CRYPTO_POLICY) - int rc = WOLFSSL_FAILURE; + int rc = WC_NO_ERR_TRACE(WOLFSSL_FAILURE); const char * policy_list[] = { "examples/crypto_policies/legacy/wolfssl.txt", "examples/crypto_policies/default/wolfssl.txt", @@ -92206,7 +92206,7 @@ static int test_wolfSSL_crypto_policy_tls_methods(void) { EXPECT_DECLS; #if defined(WOLFSSL_SYS_CRYPTO_POLICY) - int rc = WOLFSSL_FAILURE; + int rc = WC_NO_ERR_TRACE(WOLFSSL_FAILURE); const char * policy_list[] = { "examples/crypto_policies/legacy/wolfssl.txt", "examples/crypto_policies/default/wolfssl.txt", @@ -92399,7 +92399,7 @@ static int test_wolfSSL_crypto_policy_ciphers(void) { EXPECT_DECLS; #if defined(WOLFSSL_SYS_CRYPTO_POLICY) - int rc = WOLFSSL_FAILURE; + int rc = WC_NO_ERR_TRACE(WOLFSSL_FAILURE); const char * policy_list[] = { "examples/crypto_policies/legacy/wolfssl.txt", "examples/crypto_policies/default/wolfssl.txt",