X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fopenssl%2Fcrypto.c;h=6c5cbc880fded4662911115a5db45877b0f4b5fd;hb=3e924045ccaab1441b77ff43a2d7eb759b313f7b;hp=ece7f059eb9c1a4ea6fdf5ad82f34d56a62eeb82;hpb=9b9230a0a79c670b86f54fadd2807b864ff9d91f;p=tinc diff --git a/src/openssl/crypto.c b/src/openssl/crypto.c index ece7f059..6c5cbc88 100644 --- a/src/openssl/crypto.c +++ b/src/openssl/crypto.c @@ -31,7 +31,13 @@ void crypto_init(void) { ENGINE_load_builtin_engines(); ENGINE_register_all_complete(); + ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); + + if(!RAND_status()) { + fprintf(stderr, "Not enough entropy for the PRNG!\n"); + abort(); + } } void crypto_exit(void) {