X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fcrypto.c;h=5df3e61a13111d676866ed24b6209d6d7505b839;hb=HEAD;hp=330940a9cf653f3cb396cc331876e9e6f3bc20a8;hpb=2d3e9d753288b0ce7d6b725f7d6414907d0ef485;p=citadel.git diff --git a/webcit/crypto.c b/webcit/crypto.c index 330940a9c..845113791 100644 --- a/webcit/crypto.c +++ b/webcit/crypto.c @@ -12,7 +12,7 @@ #ifdef HAVE_OPENSSL #include "webcit.h" -#include "webserver.h" + SSL_CTX *ssl_ctx; // Global SSL context @@ -22,10 +22,6 @@ char *ssl_cipher_list = DEFAULT_SSL_CIPHER_LIST; pthread_key_t ThreadSSL; // Per-thread SSL context -void shutdown_ssl(void) { - ERR_free_strings(); -} - // Set the private key and certificate chain for the global SSL Context. // This is called during initialization, and can be called again later if the certificate changes. @@ -70,9 +66,11 @@ void bind_to_key_and_certificate(void) { // initialize ssl engine, load certs and initialize openssl internals void init_ssl(void) { - // Initialize SSL transport layer - SSL_library_init(); + // Initialize the OpenSSL library SSL_load_error_strings(); + ERR_load_crypto_strings(); + OpenSSL_add_all_algorithms(); + SSL_library_init(); // Now try to bind to the key and certificate. bind_to_key_and_certificate();