From 877d3b563002b81b7000412098d21c56d5a4ed09 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Wed, 21 Jul 2021 00:04:08 +0200 Subject: [PATCH] Call ENGINE_load_builtin_engines(). As suggested by Rosen Penev, use ENGINE_load_builtin_engines() to ensure the AFALG engines get loaded as well. We apparently also don't need to call OPENSSL_init_crypto() ourself. --- src/openssl/crypto.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/openssl/crypto.c b/src/openssl/crypto.c index 8fc7e77b..7e020e61 100644 --- a/src/openssl/crypto.c +++ b/src/openssl/crypto.c @@ -94,8 +94,7 @@ void randomize(void *out, size_t outlen) { void crypto_init(void) { random_init(); - uint64_t opts = OPENSSL_INIT_LOAD_CRYPTO_STRINGS | OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS | OPENSSL_INIT_ENGINE_ALL_BUILTIN; - OPENSSL_init_crypto(opts, NULL); + ENGINE_load_builtin_engines(); if(!RAND_status()) { fprintf(stderr, "Not enough entropy for the PRNG!\n"); -- 2.20.1