aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/tlspicotls/pico_vpp_crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/tlspicotls/pico_vpp_crypto.c')
-rw-r--r--src/plugins/tlspicotls/pico_vpp_crypto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/tlspicotls/pico_vpp_crypto.c b/src/plugins/tlspicotls/pico_vpp_crypto.c
index 049b05139d8..9af0f2f4d92 100644
--- a/src/plugins/tlspicotls/pico_vpp_crypto.c
+++ b/src/plugins/tlspicotls/pico_vpp_crypto.c
@@ -141,7 +141,8 @@ ptls_vpp_crypto_aead_decrypt (ptls_aead_context_t *_ctx, void *_output,
ctx->op.dst = _output;
ctx->op.src = (void *) input;
ctx->op.len = inlen - tag_size;;
- ctx->op.iv = ctx->static_iv;
+ ctx->op.iv = ctx->iv;
+ ptls_aead__build_iv (ctx->super.algo, ctx->op.iv, ctx->static_iv, seq);
ctx->op.aad = (void *) aad;
ctx->op.aad_len = aadlen;
ctx->op.tag = (void *) input + inlen - tag_size;
@@ -160,7 +161,6 @@ ptls_vpp_crypto_aead_encrypt_init (ptls_aead_context_t *_ctx, uint64_t seq,
struct vpp_aead_context_t *ctx = (struct vpp_aead_context_t *) _ctx;
ctx->op.iv = ctx->iv;
ptls_aead__build_iv (ctx->super.algo, ctx->op.iv, ctx->static_iv, seq);
- ctx->op.iv = ctx->static_iv;
ctx->op.aad = (void *) aad;
ctx->op.aad_len = aadlen;
ctx->op.n_chunks = 2;