]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix sha1 enable environment variable in test code on windows.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 22 Aug 2025 08:04:57 +0000 (10:04 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 22 Aug 2025 08:04:57 +0000 (10:04 +0200)
doc/Changelog
testcode/testbound.c
testcode/unitverify.c

index 2efbb551539650f43f43b2b80e9e1085789f4ef4..020c89eda3c636a2b67de1cfe9ae9173d3e5ecbb 100644 (file)
@@ -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,
index 410ec165c68ba094c5fc18bb167432dd601f8caa..063037df4e8047bafe106a65a044a20f58fc2339 100644 (file)
@@ -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);
        }
index 24274c58b69961d99fa1a358bdb6e2ae49f5e323..12d5205b07daf76060b25219c6dae661e5d42314 100644 (file)
@@ -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