From ac996737e567c1ff29afbfb00acf22a2b4d57b7b Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 26 Sep 2013 00:17:59 +0900 Subject: [PATCH] Move OpenSSL_add_all_algorithms() to Platform::setUp() --- src/LibsslTLSContext.cc | 3 --- src/Platform.cc | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/LibsslTLSContext.cc b/src/LibsslTLSContext.cc index 6604c757..8d734cce 100644 --- a/src/LibsslTLSContext.cc +++ b/src/LibsslTLSContext.cc @@ -149,9 +149,6 @@ bool OpenSSLTLSContext::addCredentialFile(const std::string& certfile, } bool OpenSSLTLSContext::addP12CredentialFile(const std::string& p12file) { - // Need this to "decrypt" p12 files. - OpenSSL_add_all_algorithms(); - std::stringstream ss; BufferedFile(p12file.c_str(), "rb").transfer(ss); diff --git a/src/Platform.cc b/src/Platform.cc index f91a14f4..13337914 100644 --- a/src/Platform.cc +++ b/src/Platform.cc @@ -103,6 +103,8 @@ bool Platform::setUp() // for SSL initialization SSL_load_error_strings(); SSL_library_init(); + // Need this to "decrypt" p12 files. + OpenSSL_add_all_algorithms(); #endif // HAVE_OPENSSL #ifdef HAVE_LIBGCRYPT if(!gcry_check_version(A2_MIN_GCRYPT_VERSION)) {