From c60589e6b9085bf5d6fd9c43f2a7eeda3c49494f Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Tue, 2 Aug 2016 10:29:26 +0200 Subject: Honour OPENSSL_NO_DES Patch suggestion by Michae in ERL-203 at bugs.erlang.org. --- lib/crypto/c_src/crypto.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/crypto/c_src') diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 7183c395ae..06e842cc12 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -37,7 +37,9 @@ #include #include +#ifndef OPENSSL_NO_DES #include +#endif /* #ifndef OPENSSL_NO_DES */ /* #include This is not supported on the openssl OTP requires */ #include #include @@ -461,17 +463,18 @@ struct cipher_type_t { struct cipher_type_t cipher_types[] = { {{"rc2_cbc"}, {&EVP_rc2_cbc}}, +#ifndef OPENSSL_NO_DES {{"des_cbc"}, {&EVP_des_cbc}}, {{"des_cfb"}, {&EVP_des_cfb8}}, {{"des_ecb"}, {&EVP_des_ecb}}, {{"des_ede3_cbc"}, {&EVP_des_ede3_cbc}}, {{"des_ede3_cbf"}, #ifdef HAVE_DES_ede3_cfb_encrypt - {&EVP_des_ede3_cfb8} + {&EVP_des_ede3_cfb8}}, #else - {NULL} + {NULL}}, #endif - }, +#endif /* #ifndef OPENSSL_NO_DES */ {{"blowfish_cbc"}, {&EVP_bf_cbc}}, {{"blowfish_cfb64"}, {&EVP_bf_cfb64}}, {{"blowfish_ofb64"}, {&EVP_bf_ofb}}, -- cgit v1.2.3