diff options
author | Neale Ranns <nranns@cisco.com> | 2019-06-06 13:28:14 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-06-07 11:19:12 +0000 |
commit | f2922422d972644e67d1ca989e40cd0100ecb06d (patch) | |
tree | 6833280b7516aa3602a001830f0f3c0e5dd33e1c /src/vnet/crypto | |
parent | 814f15948cbcf67f9a9c9792b22ce1f182eaa20d (diff) |
ipsec: remove the set_key API
there's no use case to just change the key of an SA. instead the SA
should be renegociated and the new SA applied to the existing SPD entry
or tunnel.
the set_key functions were untested.
Type: refactor
Change-Id: Ib096eebaafb20be7b5501ece5a24aea038373002
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/crypto')
-rw-r--r-- | src/vnet/crypto/crypto.c | 22 | ||||
-rw-r--r-- | src/vnet/crypto/crypto.h | 2 |
2 files changed, 0 insertions, 24 deletions
diff --git a/src/vnet/crypto/crypto.c b/src/vnet/crypto/crypto.c index b447ffbfd5e..bad3970f419 100644 --- a/src/vnet/crypto/crypto.c +++ b/src/vnet/crypto/crypto.c @@ -239,28 +239,6 @@ vnet_crypto_key_del (vlib_main_t * vm, vnet_crypto_key_index_t index) pool_put (cm->keys, key); } -void -vnet_crypto_key_modify (vlib_main_t * vm, vnet_crypto_key_index_t index, - vnet_crypto_alg_t alg, u8 * data, u16 length) -{ - vnet_crypto_main_t *cm = &crypto_main; - vnet_crypto_engine_t *engine; - vnet_crypto_key_t *key = pool_elt_at_index (cm->keys, index); - - if (vec_len (key->data)) - clib_memset (key->data, 0, vec_len (key->data)); - vec_free (key->data); - vec_validate_aligned (key->data, length - 1, CLIB_CACHE_LINE_BYTES); - clib_memcpy (key->data, data, length); - key->alg = alg; - - /* *INDENT-OFF* */ - vec_foreach (engine, cm->engines) - if (engine->key_op_handler) - engine->key_op_handler (vm, VNET_CRYPTO_KEY_OP_MODIFY, index); - /* *INDENT-ON* */ -} - static void vnet_crypto_init_cipher_data (vnet_crypto_alg_t alg, vnet_crypto_op_id_t eid, vnet_crypto_op_id_t did, char *name, u8 is_aead) diff --git a/src/vnet/crypto/crypto.h b/src/vnet/crypto/crypto.h index 7267e06aaa0..89af8535c52 100644 --- a/src/vnet/crypto/crypto.h +++ b/src/vnet/crypto/crypto.h @@ -209,8 +209,6 @@ int vnet_crypto_set_handler (char *ops_handler_name, char *engine); u32 vnet_crypto_key_add (vlib_main_t * vm, vnet_crypto_alg_t alg, u8 * data, u16 length); void vnet_crypto_key_del (vlib_main_t * vm, vnet_crypto_key_index_t index); -void vnet_crypto_key_modify (vlib_main_t * vm, vnet_crypto_key_index_t index, - vnet_crypto_alg_t alg, u8 * data, u16 len); format_function_t format_vnet_crypto_alg; format_function_t format_vnet_crypto_engine; |