]> git.meshlink.io Git - meshlink/blobdiff - src/openssl/crypto.c
Refactory of route() function to have just one like in tinc1.1
[meshlink] / src / openssl / crypto.c
index ece7f059eb9c1a4ea6fdf5ad82f34d56a62eeb82..6c5cbc880fded4662911115a5db45877b0f4b5fd 100644 (file)
@@ -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) {