aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2016-08-02 10:29:26 +0200
committerRaimo Niskanen <[email protected]>2016-09-02 11:07:31 +0200
commitc60589e6b9085bf5d6fd9c43f2a7eeda3c49494f (patch)
tree489f088cc2dbe8f06bdf0c32553bdb565841c325 /lib
parent3b7a6ffddc819bf305353a593904cea9e932e7dc (diff)
downloadotp-c60589e6b9085bf5d6fd9c43f2a7eeda3c49494f.tar.gz
otp-c60589e6b9085bf5d6fd9c43f2a7eeda3c49494f.tar.bz2
otp-c60589e6b9085bf5d6fd9c43f2a7eeda3c49494f.zip
Honour OPENSSL_NO_DES
Patch suggestion by Michae in ERL-203 at bugs.erlang.org.
Diffstat (limited to 'lib')
-rw-r--r--lib/crypto/c_src/crypto.c9
1 files changed, 6 insertions, 3 deletions
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 <openssl/opensslconf.h>
#include <openssl/crypto.h>
+#ifndef OPENSSL_NO_DES
#include <openssl/des.h>
+#endif /* #ifndef OPENSSL_NO_DES */
/* #include <openssl/idea.h> This is not supported on the openssl OTP requires */
#include <openssl/dsa.h>
#include <openssl/rsa.h>
@@ -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}},