aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/tlspicotls/tls_picotls.c
diff options
context:
space:
mode:
authorSimon Zhang <yuwei1.zhang@intel.com>2020-11-03 23:48:03 +0800
committerFlorin Coras <florin.coras@gmail.com>2020-11-04 02:57:52 +0000
commit34f29d8b60ea937dcfc9bcf4f6826ec1a0817395 (patch)
treec8cce3efeb763a5fa9ef7654f6139e8ecc2fe540 /src/plugins/tlspicotls/tls_picotls.c
parent89235c7ac70dd02848de14c697c3b3bf3895d4b2 (diff)
tls: fix picotls engine crypto multi-thread issue
Type: fix Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com> Change-Id: Ib454ccae5a81f91a744db82b72c7f1fcb29aa0cc
Diffstat (limited to 'src/plugins/tlspicotls/tls_picotls.c')
-rw-r--r--src/plugins/tlspicotls/tls_picotls.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/tlspicotls/tls_picotls.c b/src/plugins/tlspicotls/tls_picotls.c
index 62782c6c113..32bc2a3c57a 100644
--- a/src/plugins/tlspicotls/tls_picotls.c
+++ b/src/plugins/tlspicotls/tls_picotls.c
@@ -1,8 +1,8 @@
#include <math.h>
-#include "certs.h"
-#include "tls_picotls.h"
-#include "pico_vpp_crypto.h"
+#include <tlspicotls/certs.h>
+#include <tlspicotls/tls_picotls.h>
+#include <tlspicotls/pico_vpp_crypto.h>
picotls_main_t picotls_main;
@@ -574,6 +574,8 @@ tls_picotls_init (vlib_main_t * vm)
vec_validate (pm->ctx_pool, num_threads - 1);
+ clib_rwlock_init (&picotls_main.crypto_keys_rw_lock);
+
tls_register_engine (&picotls_engine, CRYPTO_ENGINE_PICOTLS);
return error;