Call OpenSSL_add_all_algorithms()
authoraland <aland>
Wed, 24 Oct 2007 11:04:29 +0000 (11:04 +0000)
committeraland <aland>
Wed, 24 Oct 2007 11:04:29 +0000 (11:04 +0000)
We still need to call EVP_cleanup() on clean exit, but who's
counting?

src/main/threads.c

index d814c3e..b35709d 100644 (file)
@@ -60,6 +60,9 @@ RCSID("$Id$")
 #ifdef HAVE_OPENSSL_ERR_H
 #include <openssl/err.h>
 #endif
+#ifdef HAVE_OPENSSL_EVP_H
+#include <openssl/evp.h>
+#endif
 
 #define SEMAPHORE_LOCKED       (0)
 #define SEMAPHORE_UNLOCKED     (1)
@@ -208,6 +211,13 @@ static int setup_ssl_mutexes(void)
 {
        int i;
 
+#ifdef HAVE_OPENSSL_EVP_H
+       /*
+        *      Enable all ciphers and digests.
+        */
+       OpenSSL_add_all_algorithms();
+#endif
+
        ssl_mutexes = rad_malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t));
        if (!ssl_mutexes) {
                radlog(L_ERR, "Error allocating memory for SSL mutexes!");
@@ -917,6 +927,7 @@ static void thread_pool_manage(time_t now)
                total = thread_pool.min_spare_threads - spare;
 
                DEBUG2("Threads: Spawning %d spares", total);
+
                /*
                 *      Create a number of spare threads.
                 */