From bc04f84df19a9b660b10cbc868aa82834347d3ac Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Wed, 4 Sep 2024 15:29:32 -0400 Subject: [PATCH 01/11] Enable logging in wolfssl --- src/wp_wolfprov.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/wp_wolfprov.c b/src/wp_wolfprov.c index 34664de..14be55b 100644 --- a/src/wp_wolfprov.c +++ b/src/wp_wolfprov.c @@ -33,6 +33,8 @@ #include "wolfprovider/wp_wolfprov.h" #include "wolfprovider/alg_funcs.h" +#include "wolfssl/wolfcrypt/logging.h" + const char* wolfprovider_id = "libwolfprov"; /* Core function that gets the table of parameters. */ @@ -1133,6 +1135,11 @@ int wolfssl_provider_init(const OSSL_CORE_HANDLE* handle, int ok = 1; OSSL_FUNC_core_get_libctx_fn* c_get_libctx = NULL; +#ifdef WOLFPROV_DEBUG + ok = (wolfProv_Debugging_ON() == 0) && (wolfSSL_Debugging_ON() == 0); + wolfSSL_SetLoggingPrefix("wolfSSL"); +#endif + for (; in->function_id != 0; in++) { switch (in->function_id) { case OSSL_FUNC_CORE_GETTABLE_PARAMS: From 18d845c3fdf5d7850df75929339dce377b31efe2 Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Wed, 4 Sep 2024 15:29:52 -0400 Subject: [PATCH 02/11] Add helpful failure messages --- src/wp_ecc_kmgmt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wp_ecc_kmgmt.c b/src/wp_ecc_kmgmt.c index 3ccf7d2..0b1442d 100644 --- a/src/wp_ecc_kmgmt.c +++ b/src/wp_ecc_kmgmt.c @@ -1869,11 +1869,13 @@ static int wp_ecc_decode_params(wp_Ecc* ecc, unsigned char* data, word32 len) ok = 0; } if (ok && (data[0] != 0x06)) { + WOLFPROV_MSG(WP_LOG_PK, "Invalid data"); ok = 0; } if (ok) { oidLen = data[1]; if ((oidLen >= 0x80) || (oidLen + 2 > len)) { + WOLFPROV_MSG(WP_LOG_PK, "OID out of bounds"); ok = 0; } } @@ -1884,6 +1886,7 @@ static int wp_ecc_decode_params(wp_Ecc* ecc, unsigned char* data, word32 len) ecc->curveId = wp_ecc_get_curve_id_from_oid(data + 2, oidLen); #endif if (ecc->curveId == ECC_CURVE_INVALID) { + WOLFPROV_MSG(WP_LOG_PK, "Invalid curve"); ok = 0; } } @@ -1891,10 +1894,12 @@ static int wp_ecc_decode_params(wp_Ecc* ecc, unsigned char* data, word32 len) if (ok) { rc = wc_ecc_set_curve(&ecc->key, 0, ecc->curveId); if (rc != 0) { + WOLFPROV_MSG(WP_LOG_PK, "Can't set curve: %d",rc); ok = 0; } } if (ok && (!wp_ecc_set_bits(ecc))) { + WOLFPROV_MSG(WP_LOG_PK, "Can't set bits"); ok = 0; } From d4025477e5b3ea60d2bac580bc23cfec63934ad7 Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Wed, 4 Sep 2024 16:32:59 -0400 Subject: [PATCH 03/11] Add more logging of calls --- src/wp_aes_aead.c | 1 + src/wp_aes_stream.c | 1 + src/wp_dh_kmgmt.c | 1 + src/wp_drbg.c | 4 ++++ src/wp_ecc_kmgmt.c | 3 +++ src/wp_ecx_kmgmt.c | 1 + src/wp_file_store.c | 1 + src/wp_kdf_kmgmt.c | 2 ++ src/wp_mac_kmgmt.c | 2 ++ src/wp_rsa_kmgmt.c | 3 +++ src/wp_wolfprov.c | 4 ++++ 11 files changed, 23 insertions(+) diff --git a/src/wp_aes_aead.c b/src/wp_aes_aead.c index e9d00e3..319180c 100644 --- a/src/wp_aes_aead.c +++ b/src/wp_aes_aead.c @@ -603,6 +603,7 @@ static int wp_aead_set_param_tls1_iv_rand(wp_AeadCtx* ctx, #else (void)ctx; (void)params; + WOLFPROV_LEAVE(WP_LOG_CIPHER, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; #endif } diff --git a/src/wp_aes_stream.c b/src/wp_aes_stream.c index 91847f8..af4e17b 100644 --- a/src/wp_aes_stream.c +++ b/src/wp_aes_stream.c @@ -450,6 +450,7 @@ static int wp_aes_stream_final(wp_AesStreamCtx* ctx, unsigned char *out, (void)out; (void)outSize; *outLen = 0; + WOLFPROV_LEAVE(WP_LOG_CIPHER, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; } diff --git a/src/wp_dh_kmgmt.c b/src/wp_dh_kmgmt.c index cc5b2e0..cbc5e5c 100644 --- a/src/wp_dh_kmgmt.c +++ b/src/wp_dh_kmgmt.c @@ -276,6 +276,7 @@ int wp_dh_up_ref(wp_Dh* dh) return ok; #else dh->refCnt++; + WOLFPROV_LEAVE(WP_LOG_KE, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; #endif } diff --git a/src/wp_drbg.c b/src/wp_drbg.c index 5db2a87..babfdda 100644 --- a/src/wp_drbg.c +++ b/src/wp_drbg.c @@ -166,6 +166,7 @@ static int wp_drbg_uninstantiate(wp_DrbgCtx* ctx) OPENSSL_clear_free(ctx->rng, sizeof(*ctx->rng)); #endif ctx->rng = NULL; + WOLFPROV_LEAVE(WP_LOG_RNG, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; } @@ -331,6 +332,7 @@ static int wp_drbg_unlock(wp_DrbgCtx* ctx) wc_UnLockMutex(ctx->mutex); } #endif + WOLFPROV_LEAVE(WP_LOG_RNG, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; } @@ -419,6 +421,7 @@ static int wp_drbg_set_ctx_params(wp_DrbgCtx* ctx, const OSSL_PARAM params[]) { (void)ctx; (void)params; + WOLFPROV_LEAVE(WP_LOG_RNG, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; } @@ -431,6 +434,7 @@ static int wp_drbg_set_ctx_params(wp_DrbgCtx* ctx, const OSSL_PARAM params[]) static int wp_drbg_verify_zeroization(wp_DrbgCtx* ctx) { (void)ctx; + WOLFPROV_LEAVE(WP_LOG_RNG, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; } diff --git a/src/wp_ecc_kmgmt.c b/src/wp_ecc_kmgmt.c index 0b1442d..fd3418b 100644 --- a/src/wp_ecc_kmgmt.c +++ b/src/wp_ecc_kmgmt.c @@ -256,6 +256,7 @@ int wp_ecc_up_ref(wp_Ecc* ecc) return ok; #else ecc->refCnt++; + WOLFPROV_LEAVE(WP_LOG_PK, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; #endif } @@ -2113,6 +2114,7 @@ static int wp_ecc_encode_params_size(const wp_Ecc *ecc, size_t* keyLen) /* ASN.1 type, len and data. */ *keyLen = ecc->key.dp->oidSz + 2; + WOLFPROV_LEAVE(WP_LOG_PK, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; } @@ -2135,6 +2137,7 @@ static int wp_ecc_encode_params(const wp_Ecc *ecc, unsigned char* keyData, *keyLen = ecc->key.dp->oidSz + 2; + WOLFPROV_LEAVE(WP_LOG_PK, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; } diff --git a/src/wp_ecx_kmgmt.c b/src/wp_ecx_kmgmt.c index 98ed5ae..430f315 100644 --- a/src/wp_ecx_kmgmt.c +++ b/src/wp_ecx_kmgmt.c @@ -224,6 +224,7 @@ int wp_ecx_up_ref(wp_Ecx* ecx) return ok; #else ecx->refCnt++; + WOLFPROV_LEAVE(WP_LOG_PK, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; #endif } diff --git a/src/wp_file_store.c b/src/wp_file_store.c index be481c8..5b41378 100644 --- a/src/wp_file_store.c +++ b/src/wp_file_store.c @@ -480,6 +480,7 @@ static int wp_file_eof(wp_FileCtx* ctx) static int wp_file_close(wp_FileCtx* ctx) { wp_filectx_free(ctx); + WOLFPROV_LEAVE(WP_LOG_PROVIDER, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; } diff --git a/src/wp_kdf_kmgmt.c b/src/wp_kdf_kmgmt.c index 0697186..d17351b 100644 --- a/src/wp_kdf_kmgmt.c +++ b/src/wp_kdf_kmgmt.c @@ -71,6 +71,7 @@ int wp_kdf_up_ref(wp_Kdf* kdf) return ok; #else kdf->refCnt++; + WOLFPROV_LEAVE(WP_LOG_KDF, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; #endif } @@ -151,6 +152,7 @@ static int wp_kdf_has(const wp_Kdf* kdf, int selection) { (void)kdf; (void)selection; + WOLFPROV_LEAVE(WP_LOG_KDF, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; } diff --git a/src/wp_mac_kmgmt.c b/src/wp_mac_kmgmt.c index b23ec5d..a14e548 100644 --- a/src/wp_mac_kmgmt.c +++ b/src/wp_mac_kmgmt.c @@ -108,6 +108,7 @@ int wp_mac_up_ref(wp_Mac* mac) return ok; #else mac->refCnt++; + WOLFPROV_LEAVE(WP_LOG_MAC, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; #endif } @@ -435,6 +436,7 @@ static int wp_mac_export_priv_key(wp_Mac* mac, OSSL_PARAM* params, int* pIdx, } *pIdx = i; + WOLFPROV_LEAVE(WP_LOG_MAC, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; } diff --git a/src/wp_rsa_kmgmt.c b/src/wp_rsa_kmgmt.c index 017e615..0c1a5b8 100644 --- a/src/wp_rsa_kmgmt.c +++ b/src/wp_rsa_kmgmt.c @@ -199,6 +199,7 @@ int wp_rsa_up_ref(wp_Rsa* rsa) return ok; #else rsa->refCnt++; + WOLFPROV_LEAVE(WP_LOG_PK, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; #endif } @@ -468,6 +469,7 @@ static int wp_rsa_pss_params_set_pss_defaults(wp_RsaPssParams* pss) pss->saltLen = 20; pss->derTrailer = 1; /* Default: RFC8017 A.2.3 */ + WOLFPROV_LEAVE(WP_LOG_PK, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; } @@ -1085,6 +1087,7 @@ static int wp_rsa_pss_params_export(wp_RsaPssParams* pss, OSSL_PARAM* params, &pss->saltLen); *idx = i; + WOLFPROV_LEAVE(WP_LOG_PK, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; } diff --git a/src/wp_wolfprov.c b/src/wp_wolfprov.c index 14be55b..8b5cccf 100644 --- a/src/wp_wolfprov.c +++ b/src/wp_wolfprov.c @@ -75,6 +75,7 @@ static const OSSL_PARAM* wolfprov_gettable_params(void* provCtx) int wolfssl_prov_is_running(void) { /* Always running. */ + WOLFPROV_LEAVE(WP_LOG_PROVIDER, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; } @@ -174,6 +175,7 @@ static int bio_core_new(BIO *bio) { BIO_set_init(bio, 1); + WOLFPROV_LEAVE(WP_LOG_PROVIDER, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; } @@ -182,6 +184,7 @@ static int bio_core_free(BIO *bio) BIO_set_init(bio, 0); wolfssl_prov_bio_free(BIO_get_data(bio)); + WOLFPROV_LEAVE(WP_LOG_PROVIDER, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; } @@ -911,6 +914,7 @@ static int wp_dummy_decode(WOLFPROV_CTX* ctx, OSSL_CORE_BIO* cBio, (void)pwCb; (void)pwCbArg; + WOLFPROV_LEAVE(WP_LOG_PROVIDER, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), 1); return 1; } /** From dff54af1cc99deacd4b4297c1435046bbe026190 Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Thu, 5 Sep 2024 12:58:18 -0400 Subject: [PATCH 04/11] Fix for openssl denying connections --- src/wp_ecc_kmgmt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/wp_ecc_kmgmt.c b/src/wp_ecc_kmgmt.c index fd3418b..47c19aa 100644 --- a/src/wp_ecc_kmgmt.c +++ b/src/wp_ecc_kmgmt.c @@ -801,6 +801,14 @@ static int wp_ecc_get_params(wp_Ecc* ecc, OSSL_PARAM params[]) } } + if (ok) { + /* Always assume not decoded from explicit params for now */ + p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS); + if ((p != NULL) && !OSSL_PARAM_set_int(p, 0)) { + ok = 0; + } + } + WOLFPROV_LEAVE(WP_LOG_PK, __FILE__ ":" WOLFPROV_STRINGIZE(__LINE__), ok); return ok; } From fa6421b25dcb8e86b7c7b75378261eed47e5af5b Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Thu, 5 Sep 2024 16:06:53 -0400 Subject: [PATCH 05/11] Add a sanity check to make sure we can connect to external servers --- scripts/test-sanity.sh | 48 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 scripts/test-sanity.sh diff --git a/scripts/test-sanity.sh b/scripts/test-sanity.sh new file mode 100755 index 0000000..52c3dea --- /dev/null +++ b/scripts/test-sanity.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# This script provides simple sanity checks to make sure the provider is working + +SET_PRE=$( set ) +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +LOG_FILE=${SCRIPT_DIR}/test-sanity.log +rm -f ${LOG_FILE} +source ${SCRIPT_DIR}/utils-wolfprovider.sh + +echo "Using openssl: $OPENSSL_TAG, wolfssl: $WOLFSSL_TAG" + +function doTestCmd() { + CMD=$* + echo ">>>>>> Running $CMD" + eval $CMD + RET=$? + if [ $RET -ne 0 ]; then + echo "Failed $CMD: $RET" + exit 1 + fi + echo "<<<<<<" +} + +doTestCmd init_wolfprov + +SET_POST=$( set ) +echo "New variables set:" +diff <(echo "$SET_PRE") <(echo "$SET_POST") | grep "=" + +doTestCmd "${OPENSSL_INSTALL_DIR}/bin/openssl list -providers --verbose | grep 'Providers:' -A 10" + +if [ $(${OPENSSL_INSTALL_DIR}/bin/openssl list -providers --verbose | grep libwolfprov | wc -l) = 0 ]; then + echo "Not using wolfProvider for some reason" + exit 2 +fi + +if [ $(${OPENSSL_INSTALL_DIR}/bin/openssl list -providers --verbose | grep OpenSSL | wc -l) -ne 0 ]; then + echo "OpenSSL provider is also enabled" + exit 2 +fi + +doTestCmd "${OPENSSL_INSTALL_DIR}/bin/openssl s_client -CApath /etc/ssl/certs -connect github.com:443 Date: Thu, 5 Sep 2024 16:07:07 -0400 Subject: [PATCH 06/11] Kitchen sink of debugging --- scripts/utils-wolfssl.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/utils-wolfssl.sh b/scripts/utils-wolfssl.sh index c4c9688..b14ec04 100755 --- a/scripts/utils-wolfssl.sh +++ b/scripts/utils-wolfssl.sh @@ -80,7 +80,8 @@ install_wolfssl() { CONF_ARGS="-prefix=${WOLFSSL_INSTALL_DIR}" if [ "$WOLFPROV_DEBUG" = "1" ]; then - CONF_ARGS+=" --enable-debug" + CONF_ARGS+=" --enable-debug --enable-debug-trace-errcodes=backtrace --enable-keylog-export" + WOLFSSL_CONFIG_CFLAGS+=" -DWOLFSSL_LOGGINGENABLED_DEFAULT=1" fi if [ "$WOLFSSL_ISFIPS" = "1" ]; then CONF_ARGS+=" --enable-fips=ready" From 7c08d650753d9e865d2a1bfc0dfd276cdf436f1d Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Thu, 5 Sep 2024 16:07:21 -0400 Subject: [PATCH 07/11] Add FIPS testing --- scripts/test-sanity.sh | 44 ++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/scripts/test-sanity.sh b/scripts/test-sanity.sh index 52c3dea..534d7c1 100755 --- a/scripts/test-sanity.sh +++ b/scripts/test-sanity.sh @@ -21,28 +21,38 @@ function doTestCmd() { echo "<<<<<<" } -doTestCmd init_wolfprov +function runSpotCheck() { + SPOTCHECK_ARGS=$1 + rm -rf ${WOLFSSL_INSTALL_DIR} ${WOLFPROV_INSTALL_DIR} + doTestCmd "$1 init_wolfprov" -SET_POST=$( set ) -echo "New variables set:" -diff <(echo "$SET_PRE") <(echo "$SET_POST") | grep "=" + SET_POST=$( set ) + echo "New variables set:" + diff <(echo "$SET_PRE") <(echo "$SET_POST") | grep "=" -doTestCmd "${OPENSSL_INSTALL_DIR}/bin/openssl list -providers --verbose | grep 'Providers:' -A 10" + doTestCmd "${OPENSSL_INSTALL_DIR}/bin/openssl list -providers --verbose | grep 'Providers:' -A 10" -if [ $(${OPENSSL_INSTALL_DIR}/bin/openssl list -providers --verbose | grep libwolfprov | wc -l) = 0 ]; then - echo "Not using wolfProvider for some reason" - exit 2 -fi + if [ $(${OPENSSL_INSTALL_DIR}/bin/openssl list -providers --verbose | grep libwolfprov | wc -l) = 0 ]; then + echo "Not using wolfProvider for some reason" + exit 2 + fi + + if [ $(${OPENSSL_INSTALL_DIR}/bin/openssl list -providers --verbose | grep OpenSSL | wc -l) -ne 0 ]; then + echo "OpenSSL provider is also enabled" + exit 2 + fi -if [ $(${OPENSSL_INSTALL_DIR}/bin/openssl list -providers --verbose | grep OpenSSL | wc -l) -ne 0 ]; then - echo "OpenSSL provider is also enabled" - exit 2 -fi + doTestCmd "${OPENSSL_INSTALL_DIR}/bin/openssl s_client -CApath /etc/ssl/certs -connect github.com:443 Date: Fri, 6 Sep 2024 14:23:07 -0400 Subject: [PATCH 08/11] Get FIPS tests running --- scripts/test-sanity.sh | 5 ++++- scripts/utils-wolfssl.sh | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/test-sanity.sh b/scripts/test-sanity.sh index 534d7c1..57ba88c 100755 --- a/scripts/test-sanity.sh +++ b/scripts/test-sanity.sh @@ -1,5 +1,6 @@ #!/bin/bash # This script provides simple sanity checks to make sure the provider is working +# NOTE: Careful running this script, because it will remove folders automatically SET_PRE=$( set ) SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" @@ -23,7 +24,9 @@ function doTestCmd() { function runSpotCheck() { SPOTCHECK_ARGS=$1 - rm -rf ${WOLFSSL_INSTALL_DIR} ${WOLFPROV_INSTALL_DIR} + unset OPENSSL_MODULES + unset OPENSSL_CONF + rm -rf ${WOLFSSL_INSTALL_DIR} ${WOLFSSL_SOURCE_DIR} ${WOLFPROV_INSTALL_DIR} doTestCmd "$1 init_wolfprov" SET_POST=$( set ) diff --git a/scripts/utils-wolfssl.sh b/scripts/utils-wolfssl.sh index b14ec04..565a36f 100755 --- a/scripts/utils-wolfssl.sh +++ b/scripts/utils-wolfssl.sh @@ -84,6 +84,7 @@ install_wolfssl() { WOLFSSL_CONFIG_CFLAGS+=" -DWOLFSSL_LOGGINGENABLED_DEFAULT=1" fi if [ "$WOLFSSL_ISFIPS" = "1" ]; then + printf "with FIPS ... " CONF_ARGS+=" --enable-fips=ready" if [ ! -e "XXX-fips-test" ]; then ./fips-check.sh keep nomakecheck fips-ready >>$LOG_FILE 2>&1 From 03aa469ed528b91d6df66961b082c98eb398adad Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Fri, 6 Sep 2024 14:42:48 -0400 Subject: [PATCH 09/11] Add test-sanity Jenkins job --- scripts/test-sanity.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/test-sanity.sh b/scripts/test-sanity.sh index 57ba88c..0c3d5c5 100755 --- a/scripts/test-sanity.sh +++ b/scripts/test-sanity.sh @@ -27,7 +27,7 @@ function runSpotCheck() { unset OPENSSL_MODULES unset OPENSSL_CONF rm -rf ${WOLFSSL_INSTALL_DIR} ${WOLFSSL_SOURCE_DIR} ${WOLFPROV_INSTALL_DIR} - doTestCmd "$1 init_wolfprov" + doTestCmd init_wolfprov SET_POST=$( set ) echo "New variables set:" @@ -52,10 +52,6 @@ function runSpotCheck() { doTestCmd "curl https://tls.support -vv --tlsv1.3 --tls-max 1.3 -o test.html" } -echo "Now testing standard version" -runSpotCheck "" - -echo "Now testing FIPS version" -runSpotCheck "WOLFSSL_ISFIPS=1" +runSpotCheck exit $? From 6d9042abd6b9fc0bb7c545af47bb477af135c2cb Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Tue, 10 Sep 2024 11:14:16 -0400 Subject: [PATCH 10/11] Fix test --- scripts/test-sanity.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test-sanity.sh b/scripts/test-sanity.sh index 0c3d5c5..d25b297 100755 --- a/scripts/test-sanity.sh +++ b/scripts/test-sanity.sh @@ -48,7 +48,7 @@ function runSpotCheck() { doTestCmd "${OPENSSL_INSTALL_DIR}/bin/openssl s_client -CApath /etc/ssl/certs -connect github.com:443 Date: Tue, 10 Sep 2024 11:24:17 -0400 Subject: [PATCH 11/11] Don't remove files --- scripts/test-sanity.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/scripts/test-sanity.sh b/scripts/test-sanity.sh index d25b297..28f46d3 100755 --- a/scripts/test-sanity.sh +++ b/scripts/test-sanity.sh @@ -1,6 +1,5 @@ #!/bin/bash # This script provides simple sanity checks to make sure the provider is working -# NOTE: Careful running this script, because it will remove folders automatically SET_PRE=$( set ) SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" @@ -23,10 +22,6 @@ function doTestCmd() { } function runSpotCheck() { - SPOTCHECK_ARGS=$1 - unset OPENSSL_MODULES - unset OPENSSL_CONF - rm -rf ${WOLFSSL_INSTALL_DIR} ${WOLFSSL_SOURCE_DIR} ${WOLFPROV_INSTALL_DIR} doTestCmd init_wolfprov SET_POST=$( set )