]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- In unit test use openssl set security level to allow keys in test.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 4 Aug 2021 07:58:38 +0000 (09:58 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 4 Aug 2021 07:58:38 +0000 (09:58 +0200)
doc/Changelog
testcode/petal.c

index 15a2b00b74c8d142d1a5ad4621717c73a5e571cd..ad229cbe4372ce09a1c7b2b1ce4ad5ea6ef5532c 100644 (file)
@@ -1,3 +1,6 @@
+4 August 2021: Wouter
+       - In unit test use openssl set security level to allow keys in test.
+
 3 August 2021: George
        - Listen to read or write events after the SSL handshake.
          Sticky events on windows would stick on read when write was needed.
index 123684aab52da2a578065e01ed0127c0f71f9865..a1a37615518ad50e1469ccb89adad82a23d4e2b1 100644 (file)
@@ -238,6 +238,9 @@ setup_ctx(char* key, char* cert)
        (void)SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
 #endif
        (void)SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3);
+#ifdef HAVE_SSL_CTX_SET_SECURITY_LEVEL
+       SSL_CTX_set_security_level(ctx, 0); /* for keys in tests */
+#endif
        if(!SSL_CTX_use_certificate_chain_file(ctx, cert))
                print_exit("cannot read cert");
        if(!SSL_CTX_use_PrivateKey_file(ctx, key, SSL_FILETYPE_PEM))