Skip to content

Commit

Permalink
Merge pull request #221 from vpodzime/master-openssl_initialize
Browse files Browse the repository at this point in the history
Initialize OpenSSL before using it in hash_test
  • Loading branch information
vpodzime authored May 27, 2024
2 parents 1450dcb + 481f93e commit 13a9e99
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/unit/hash_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ void tests_setup()
initialized = 0;
return;
}

OPENSSL_init_crypto(0, NULL);
initialized = 1;

rsa = RSA_new();
if (rsa)
{
Expand All @@ -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()
Expand Down

0 comments on commit 13a9e99

Please sign in to comment.