From 263123e7b4f1cbe24c7ad8c25ab23602cd79f3a1 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Tue, 25 Oct 2022 12:06:50 -0500 Subject: [PATCH 1/4] wolfssl/test.h: add unsigned attribute to type of buffer passed to wolfsentry_config_json_feed() (sync with wolfsentry e22878b666). --- wolfssl/test.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wolfssl/test.h b/wolfssl/test.h index ad4076eac..e9024d511 100644 --- a/wolfssl/test.h +++ b/wolfssl/test.h @@ -1585,7 +1585,8 @@ static int wolfsentry_setup( #if !defined(NO_FILESYSTEM) && !defined(WOLFSENTRY_NO_JSON) if (_wolfsentry_config_path != NULL) { - char buf[512], err_buf[512]; + unsigned char buf[512]; + char err_buf[512]; struct wolfsentry_json_process_state *jps; FILE *f = fopen(_wolfsentry_config_path, "r"); From e464d374c01af051f62bfd8371f672b82f7cdc3a Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Tue, 25 Oct 2022 12:10:09 -0500 Subject: [PATCH 2/4] fix whitespace. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index ed23114e7..35506a40e 100644 --- a/configure.ac +++ b/configure.ac @@ -2191,7 +2191,7 @@ then # Include options.h AM_CCASFLAGS="$AM_CCASFLAGS -DEXTERNAL_OPTS_OPENVPN" ENABLED_ARMASM_CRYPTO=no - ENABLED_AESGCM_STREAM=no # not yet implemented + ENABLED_AESGCM_STREAM=no # not yet implemented AC_MSG_NOTICE([32bit ARMv7-a found, setting mfpu to neon]) ;; *) From 2575047ea28bec6374eec0650fdba373b0b99bfc Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Tue, 25 Oct 2022 17:05:48 -0500 Subject: [PATCH 3/4] wolfcrypt/src/port/arm/armv8-aes.c: define FIPS_NO_WRAPPERS, rather than undefine HAVE_FIPS, to fix FIPS builds. --- wolfcrypt/src/port/arm/armv8-aes.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wolfcrypt/src/port/arm/armv8-aes.c b/wolfcrypt/src/port/arm/armv8-aes.c index 16f14b746..b629c9666 100644 --- a/wolfcrypt/src/port/arm/armv8-aes.c +++ b/wolfcrypt/src/port/arm/armv8-aes.c @@ -33,12 +33,13 @@ #include #if !defined(NO_AES) && defined(WOLFSSL_ARMASM) -#ifndef WOLFSSL_ARMASM_NO_HW_CRYPTO -#ifdef HAVE_FIPS -#undef HAVE_FIPS +#if defined(HAVE_FIPS) && !defined(FIPS_NO_WRAPPERS) +#define FIPS_NO_WRAPPERS #endif +#ifndef WOLFSSL_ARMASM_NO_HW_CRYPTO + #include #include #include From baa19c1092c45eb03159dddb7cfd0b82385b16c0 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Tue, 25 Oct 2022 18:17:22 -0500 Subject: [PATCH 4/4] tests/api.c: fix 3 clang-analyzer-deadcode.DeadStores. --- tests/api.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/api.c b/tests/api.c index 9ee5410db..8f23065d2 100644 --- a/tests/api.c +++ b/tests/api.c @@ -48490,15 +48490,12 @@ static int test_wolfSSL_d2i_OCSP_CERTID(void) /* The below tests should fail when passed bad parameters. NULL should * always be returned. */ - certIdBad = (WOLFSSL_OCSP_CERTID*) 1; certIdBad = wolfSSL_d2i_OCSP_CERTID(NULL, &rawCertIdPtr, sizeof(rawCertId)); AssertNull(certIdBad); - certIdBad = (WOLFSSL_OCSP_CERTID*) 1; certIdBad = wolfSSL_d2i_OCSP_CERTID(&certId, NULL, sizeof(rawCertId)); AssertNull(certIdBad); - certIdBad = (WOLFSSL_OCSP_CERTID*) 1; certIdBad = wolfSSL_d2i_OCSP_CERTID(&certId, &rawCertIdPtr, 0); AssertNull(certIdBad);