aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/tlspicotls
diff options
context:
space:
mode:
authorSimon Zhang <yuwei1.zhang@intel.com>2021-06-07 23:19:33 +0800
committerDave Wallace <dwallacelf@gmail.com>2021-06-07 21:31:18 +0000
commitdd6fe0c5399e6f859e441686b703cdfa630204bd (patch)
treeffe30f7ad39a74ed788740b92a9ecd228b584036 /src/plugins/tlspicotls
parent53af06a214c15b9113df8ce66a6e95881370bb46 (diff)
tls: change picotls plugin crypto module to accommodate new version picotls
Type: fix Change-Id: I58931e235535be7d596ca578790f389b64a4fbd2 Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com> (cherry picked from commit 778b3186fc911af2aabbbfbf56bc1df5e2373061)
Diffstat (limited to 'src/plugins/tlspicotls')
-rw-r--r--src/plugins/tlspicotls/CMakeLists.txt2
-rw-r--r--src/plugins/tlspicotls/pico_vpp_crypto.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/tlspicotls/CMakeLists.txt b/src/plugins/tlspicotls/CMakeLists.txt
index 64f607117d3..f23ae6ccb8a 100644
--- a/src/plugins/tlspicotls/CMakeLists.txt
+++ b/src/plugins/tlspicotls/CMakeLists.txt
@@ -33,7 +33,7 @@ if(QUICLY_INCLUDE_DIR AND PICOTLS_INCLUDE_DIR AND PICOTLS_LINK_LIBRARIES)
pico_vpp_crypto.c
certs.c
- LINK_LIBRARIES ${PICOTLS_LINK_LIBRARIES}
+ LINK_LIBRARIES ${PICOTLS_LINK_LIBRARIES} ${OPENSSL_LIBRARIES}
)
message (STATUS "Found picotls in ${PICOTLS_INCLUDE_DIR} and ${PICOTLS_CORE_LIBRARY}")
else()
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;