Move OpenSSL_add_all_algorithms() to Platform::setUp()

pull/135/merge
Tatsuhiro Tsujikawa 2013-09-26 00:17:59 +09:00
parent d7d5e8570b
commit ac996737e5
2 changed files with 2 additions and 3 deletions

View File

@ -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);

View File

@ -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)) {