From: W.C.A. Wijngaards Date: Fri, 22 Aug 2025 08:04:57 +0000 (+0200) Subject: - Fix sha1 enable environment variable in test code on windows. X-Git-Tag: release-1.24.0rc1~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c170ed1b30337f86dc56bc446d1e84ebfaf0e1f4;p=thirdparty%2Funbound.git - Fix sha1 enable environment variable in test code on windows. --- diff --git a/doc/Changelog b/doc/Changelog index 2efbb5515..020c89eda 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,6 @@ 22 August 2025: Wouter - For #1318: Fix compile warnings for DoH compile on windows. + - Fix sha1 enable environment variable in test code on windows. 21 August 2025: Wouter - Fix to check for extraneous command arguments for unbound-control, diff --git a/testcode/testbound.c b/testcode/testbound.c index 410ec165c..063037df4 100644 --- a/testcode/testbound.c +++ b/testcode/testbound.c @@ -297,7 +297,11 @@ setup_config(FILE* in, int* lineno, int* pass_argc, char* pass_argv[]) /* Allow the use of SHA1 signatures for the test, * in case that OpenSSL disallows use of RSASHA1 * with rh-allow-sha1-signatures disabled. */ +#ifndef UB_ON_WINDOWS setenv("OPENSSL_ENABLE_SHA1_SIGNATURES", "1", 0); +#else + _putenv("OPENSSL_ENABLE_SHA1_SIGNATURES=1"); +#endif } fputs(line, cfg); } diff --git a/testcode/unitverify.c b/testcode/unitverify.c index 24274c58b..12d5205b0 100644 --- a/testcode/unitverify.c +++ b/testcode/unitverify.c @@ -638,7 +638,11 @@ verify_test(void) /* Allow the use of SHA1 signatures for the test, * in case that OpenSSL disallows use of RSASHA1 * with rh-allow-sha1-signatures disabled. */ +#ifndef UB_ON_WINDOWS setenv("OPENSSL_ENABLE_SHA1_SIGNATURES", "1", 0); +#else + _putenv("OPENSSL_ENABLE_SHA1_SIGNATURES=1"); +#endif } #endif