summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2017-01-10 09:20:07 +0100
committerRichard Levitte <levitte@openssl.org>2017-01-10 14:59:39 +0100
commitd95743047ef25fbbff9bf27aaa535ea56aa26665 (patch)
treeaf61c866a0aee8678f02d7207ed29a939f521f02
parent374d543f291ae44fd63ab7a17f5187f343b79293 (diff)
Only enable CRYPTO_3DES_ECB if that name is an existing macro
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2203)
-rw-r--r--crypto/engine/eng_cryptodev.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c
index e0e9ce471b..94480e9bd1 100644
--- a/crypto/engine/eng_cryptodev.c
+++ b/crypto/engine/eng_cryptodev.c
@@ -176,12 +176,20 @@ static struct {
} ciphers[] = {
{CRYPTO_ARC4, NID_rc4, 0, 16},
{CRYPTO_DES_CBC, NID_des_cbc, 8, 8},
-# if !defined(CRYPTO_ALGORITHM_MIN) || defined(CRYPTO_3DES_CBC)
+# if defined(CRYPTO_3DES_CBC)
{CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24},
# endif
-# if !defined(CRYPTO_ALGORITHM_MIN) || defined(CRYPTO_3DES_ECB)
+
+/*
+ * The marvell-kirkwood armv5 platform doesn't seem to have CRYPTO_3DES_ECB.
+ * Unfortunately, there is no way to detect this, except on BSD, where the
+ * crypto identities are implemented as macros. All other cryptodev
+ * implementations will be without this one.
+ */
+# if defined(CRYPTO_3DES_ECB)
{CRYPTO_3DES_ECB, NID_des_ede3_ecb, 0, 24},
# endif
+
{CRYPTO_AES_CBC, NID_aes_128_cbc, 16, 16},
{CRYPTO_AES_CBC, NID_aes_192_cbc, 16, 24},
{CRYPTO_AES_CBC, NID_aes_256_cbc, 16, 32},