From 481f93e75f3c26909da0fca10c4545138bdb9702 Mon Sep 17 00:00:00 2001 From: Vratislav Podzimek Date: Tue, 21 May 2024 17:48:01 +0200 Subject: [PATCH] Initialize OpenSSL before using it in hash_test Also, use the new API for initializing OpenSSL instead of the deprecated one. --- tests/unit/hash_test.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/unit/hash_test.c b/tests/unit/hash_test.c index d9002b53..c8416f36 100644 --- a/tests/unit/hash_test.c +++ b/tests/unit/hash_test.c @@ -40,6 +40,10 @@ void tests_setup() initialized = 0; return; } + + OPENSSL_init_crypto(0, NULL); + initialized = 1; + rsa = RSA_new(); if (rsa) { @@ -57,8 +61,6 @@ void tests_setup() RSA_generate_key_ex(rsa, 1024, bn, NULL); BN_free(bn); } - OpenSSL_add_all_digests(); - initialized = 1; } void tests_teardown()