Initialize OpenSSL outside ssl_version_check() to execute even with
disabled version check. Otherwise SSL_CTX_new() returns zero and
FreeRADIUS segfaults in init_tls_ctx with version check disabled.
exit(1);
}
+#ifdef HAVE_OPENSSL_CRYPTO_H
+ /*
+ * Initialize the OpenSSL library before calling any of its
+ * functions.
+ */
+ SSL_library_init();
+ SSL_load_error_strings();
+
/*
* Mismatch between build time OpenSSL and linked SSL,
* better to die here than segfault later.
exit(1);
}
#endif
+#endif
/* Load the modules AFTER doing SSL checks */
if (setup_modules(FALSE, mainconfig.config) < 0) {
{
long ssl_linked;
- /*
- * Initialize the library before calling any library
- * functions.
- */
- SSL_library_init();
- SSL_load_error_strings();
-
ssl_linked = SSLeay();
/*