aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/crypto
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-06-04 15:37:34 +0000
committerDamjan Marion <dmarion@me.com>2019-06-05 11:29:46 +0000
commite6be702362299566990678f505512b1b74b49112 (patch)
treeb00f992b21664c7bd4861e27a99d76fa9cbb735e /src/vnet/crypto
parent4b58a86da48a5bb861e0e329a60c3876a990f63e (diff)
IPSEC: some CLI fixes
Change-Id: I45618347e37440263270baf07b2f82f653f754a5 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/crypto')
-rw-r--r--src/vnet/crypto/crypto.c4
-rw-r--r--src/vnet/crypto/crypto.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/crypto/crypto.c b/src/vnet/crypto/crypto.c
index eecbd5f49a4..b447ffbfd5e 100644
--- a/src/vnet/crypto/crypto.c
+++ b/src/vnet/crypto/crypto.c
@@ -180,7 +180,8 @@ vnet_crypto_key_len_check (vnet_crypto_alg_t alg, u16 length)
#define _(n, s, l) \
case VNET_CRYPTO_ALG_##n: \
if ((l) == length) \
- return 1;
+ return 1; \
+ break;
foreach_crypto_cipher_alg foreach_crypto_aead_alg
#undef _
/* HMAC allows any key length */
@@ -203,7 +204,6 @@ vnet_crypto_key_add (vlib_main_t * vm, vnet_crypto_alg_t alg, u8 * data,
vnet_crypto_engine_t *engine;
vnet_crypto_key_t *key;
- ASSERT (vnet_crypto_key_len_check (alg, length));
if (!vnet_crypto_key_len_check (alg, length))
return ~0;
diff --git a/src/vnet/crypto/crypto.h b/src/vnet/crypto/crypto.h
index 5af0822812f..7267e06aaa0 100644
--- a/src/vnet/crypto/crypto.h
+++ b/src/vnet/crypto/crypto.h
@@ -23,7 +23,7 @@
/* CRYPTO_ID, PRETTY_NAME, KEY_LENGTH_IN_BYTES */
#define foreach_crypto_cipher_alg \
_(DES_CBC, "des-cbc", 7) \
- _(3DES_CBC, "3des-cbc", 14) \
+ _(3DES_CBC, "3des-cbc", 24) \
_(AES_128_CBC, "aes-128-cbc", 16) \
_(AES_192_CBC, "aes-192-cbc", 24) \
_(AES_256_CBC, "aes-256-cbc", 32) \