aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/openssl/ossl_md.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/engine/openssl/ossl_md.cpp b/src/engine/openssl/ossl_md.cpp
index 08672cfc8..7c8fb678c 100644
--- a/src/engine/openssl/ossl_md.cpp
+++ b/src/engine/openssl/ossl_md.cpp
@@ -95,20 +95,30 @@ EVP_HashFunction::~EVP_HashFunction()
HashFunction* OpenSSL_Engine::find_hash(const SCAN_Name& request,
Algorithm_Factory&) const
{
+#ifndef OPENSSL_NO_SHA
if(request.algo_name() == "SHA-160")
return new EVP_HashFunction(EVP_sha1(), "SHA-160");
+#endif
+#ifndef OPENSSL_NO_MD2
if(request.algo_name() == "MD2")
return new EVP_HashFunction(EVP_md2(), "MD2");
+#endif
+#ifndef OPENSSL_NO_MD4
if(request.algo_name() == "MD4")
return new EVP_HashFunction(EVP_md4(), "MD4");
+#endif
+#ifndef OPENSSL_NO_MD5
if(request.algo_name() == "MD5")
return new EVP_HashFunction(EVP_md5(), "MD5");
+#endif
+#ifndef OPENSSL_NO_RIPEMD
if(request.algo_name() == "RIPEMD-160")
return new EVP_HashFunction(EVP_ripemd160(), "RIPEMD-160");
+#endif
return 0;
}