From: Guus Sliepen Date: Tue, 20 Jul 2021 22:04:08 +0000 (+0200) Subject: Call ENGINE_load_builtin_engines(). X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=877d3b563002b81b7000412098d21c56d5a4ed09;p=tinc 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. --- 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");