]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Don't test a deprecated function in a no-deprecated build
authorMatt Caswell <matt@openssl.org>
Wed, 14 Oct 2020 16:34:04 +0000 (17:34 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 27 Nov 2020 11:04:54 +0000 (11:04 +0000)
EVP_PKEY_set1_DH is deprecated so there is no need to test it in a
no-deprecated build.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13138)

test/evp_extra_test.c

index fa6d173e308ecfe3514a7dfebe901a1a1f351629..c1aaf67c85d581199626b0e6de10885210c02aa3 100644 (file)
@@ -1844,7 +1844,7 @@ static int test_decrypt_null_chunks(void)
 }
 #endif /* !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305) */
 
-#ifndef OPENSSL_NO_DH
+#if !defined(OPENSSL_NO_DH) && !defined(OPENSSL_NO_DEPRECATED_3_0)
 static int test_EVP_PKEY_set1_DH(void)
 {
     DH *x942dh = NULL, *noqdh = NULL;
@@ -2197,7 +2197,7 @@ int setup_tests(void)
 #if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
     ADD_TEST(test_decrypt_null_chunks);
 #endif
-#ifndef OPENSSL_NO_DH
+#if !defined(OPENSSL_NO_DH) && !defined(OPENSSL_NO_DEPRECATED_3_0)
     ADD_TEST(test_EVP_PKEY_set1_DH);
 #endif
     ADD_ALL_TESTS(test_keygen_with_empty_template, 2);