Browse Source

Move OpenSSL_add_all_algorithms() to Platform::setUp()

Tatsuhiro Tsujikawa 12 năm trước cách đây
mục cha
commit
ac996737e5
2 tập tin đã thay đổi với 2 bổ sung3 xóa
  1. 0 3
      src/LibsslTLSContext.cc
  2. 2 0
      src/Platform.cc

+ 0 - 3
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);
 

+ 2 - 0
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)) {