X-Git-Url: http://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fopenssl%2Fcrypto.c;h=6c5cbc880fded4662911115a5db45877b0f4b5fd;hb=ee34ac3d6125b7d1f41afa82c7e30f0a7205546c;hp=ece7f059eb9c1a4ea6fdf5ad82f34d56a62eeb82;hpb=214060ef20499332b0369030b664a8e239518661;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) {