aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src/cipher.c
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2019-04-08 14:33:12 +0200
committerHans Nilsson <[email protected]>2019-04-10 10:38:10 +0200
commit39e7ecc0b3c5cbe529093f126189eadbf83d3a80 (patch)
tree88b0d95bde8a633c6fbb57b7dcc3f2f4a6faee6a /lib/crypto/c_src/cipher.c
parentf088a25bebcb74668dac21dc3b686fc2bea4502e (diff)
downloadotp-39e7ecc0b3c5cbe529093f126189eadbf83d3a80.tar.gz
otp-39e7ecc0b3c5cbe529093f126189eadbf83d3a80.tar.bz2
otp-39e7ecc0b3c5cbe529093f126189eadbf83d3a80.zip
crypto: Obey compile flags for no DSA, BF, DES, DH
Diffstat (limited to 'lib/crypto/c_src/cipher.c')
-rw-r--r--lib/crypto/c_src/cipher.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/crypto/c_src/cipher.c b/lib/crypto/c_src/cipher.c
index 13de3562e8..8f0c93c5db 100644
--- a/lib/crypto/c_src/cipher.c
+++ b/lib/crypto/c_src/cipher.c
@@ -20,10 +20,10 @@
#include "cipher.h"
-#ifdef OPENSSL_NO_DES
-#define COND_NO_DES_PTR(Ptr) (NULL)
-#else
+#ifdef HAVE_DES
#define COND_NO_DES_PTR(Ptr) (Ptr)
+#else
+#define COND_NO_DES_PTR(Ptr) (NULL)
#endif
static struct cipher_type_t cipher_types[] =
@@ -50,10 +50,17 @@ static struct cipher_type_t cipher_types[] =
{{"des_ede3_cfb"}, {NULL}, 0, 0},
#endif
+#ifdef HAVE_BF
{{"blowfish_cbc"}, {&EVP_bf_cbc}, 0, NO_FIPS_CIPHER},
{{"blowfish_cfb64"}, {&EVP_bf_cfb64}, 0, NO_FIPS_CIPHER},
{{"blowfish_ofb64"}, {&EVP_bf_ofb}, 0, NO_FIPS_CIPHER},
{{"blowfish_ecb"}, {&EVP_bf_ecb}, 0, NO_FIPS_CIPHER | ECB_BUG_0_9_8L},
+#else
+ {{"blowfish_cbc"}, {NULL}, 0, 0},
+ {{"blowfish_cfb64"}, {NULL}, 0, 0},
+ {{"blowfish_ofb64"}, {NULL}, 0, 0},
+ {{"blowfish_ecb"}, {NULL}, 0, 0},
+#endif
{{"aes_cbc"}, {&EVP_aes_128_cbc}, 16, 0},
{{"aes_cbc"}, {&EVP_aes_192_cbc}, 24, 0},