- RAND_load_file("/dev/urandom", 1024);
-
- ENGINE_load_builtin_engines();
- ENGINE_register_all_complete();
-
- OpenSSL_add_all_algorithms();
-}
-
-void crypto_exit(void) {
- EVP_cleanup();
-}
-
-void randomize(void *out, size_t outlen) {
- RAND_pseudo_bytes(out, outlen);
+#if OPENSSL_VERSION_MAJOR < 3
+ ENGINE_load_builtin_engines();
+#endif
+
+ if(!RAND_status()) {
+ fprintf(stderr, "Not enough entropy for the PRNG!\n");
+ abort();
+ }