summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec/ah_decrypt.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-03-18 18:59:25 +0100
committerNeale Ranns <nranns@cisco.com>2019-03-19 16:29:43 +0000
commit91f17dc7c4e79343b8fba924e7cea6380a0e6653 (patch)
treea5c47649bcf8d6668dc509bbc6f7b67e45714784 /src/vnet/ipsec/ah_decrypt.c
parent5daf0c55c094167ad590f683451239fa3e25c7fc (diff)
crypto: introduce crypto infra
Change-Id: Ibf320b3e7b054b686f3af9a55afd5d5bda9b1048 Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/ipsec/ah_decrypt.c')
-rw-r--r--src/vnet/ipsec/ah_decrypt.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/vnet/ipsec/ah_decrypt.c b/src/vnet/ipsec/ah_decrypt.c
index 0fc4f48571d..2488fa918f6 100644
--- a/src/vnet/ipsec/ah_decrypt.c
+++ b/src/vnet/ipsec/ah_decrypt.c
@@ -84,7 +84,6 @@ ah_decrypt_inline (vlib_main_t * vm,
{
u32 n_left_from, *from, next_index, *to_next, thread_index;
ipsec_main_t *im = &ipsec_main;
- ipsec_proto_main_t *em = &ipsec_proto_main;
from = vlib_frame_vector_args (from_frame);
n_left_from = from_frame->n_vectors;
int icv_size;
@@ -173,8 +172,7 @@ ah_decrypt_inline (vlib_main_t * vm,
(&ipsec_sa_counters, thread_index, sa_index0,
1, i_b0->current_length);
- icv_size =
- em->ipsec_proto_main_integ_algs[sa0->integ_alg].trunc_size;
+ icv_size = im->integ_algs[sa0->integ_alg].trunc_size;
if (PREDICT_TRUE (sa0->integ_alg != IPSEC_INTEG_ALG_NONE))
{
u8 sig[64];
@@ -205,7 +203,7 @@ ah_decrypt_inline (vlib_main_t * vm,
icv_padding_len =
ah_calc_icv_padding_len (icv_size, 0 /* is_ipv6 */ );
}
- hmac_calc (sa0->integ_alg, sa0->integ_key.data,
+ hmac_calc (vm, sa0->integ_alg, sa0->integ_key.data,
sa0->integ_key.len, (u8 *) ih4, i_b0->current_length,
sig, sa0->use_esn, sa0->seq_hi);