aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2022-12-20 17:41:43 -0500
committerBeno�t Ganne <bganne@cisco.com>2022-12-21 14:51:34 +0000
commit24adebad278b88b26bdae5615b6dea94dba7b757 (patch)
tree9e5ba3e43d7162b42011cef70be3376e7c53071c /src/plugins
parent15952b261f92959ca14cf6679efc318c12e90de6 (diff)
quic: fix quic plugin with openssl 3.x
- load openssl legacy providers during quic init when building with openssl 3.0 or greater - re-enable quic 'make test' testcases on ubuntu-22.04 Type: fix Change-Id: Icfd429b6bc1bddf9f9937baa44cc47cd535ac5f2 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/quic/quic.c1
-rw-r--r--src/plugins/quic/quic_crypto.h13
2 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/quic/quic.c b/src/plugins/quic/quic.c
index 898846d8ea4..3dab5eb4d07 100644
--- a/src/plugins/quic/quic.c
+++ b/src/plugins/quic/quic.c
@@ -2570,6 +2570,7 @@ quic_init (vlib_main_t * vm)
transport_register_protocol (TRANSPORT_PROTO_QUIC, &quic_proto,
FIB_PROTOCOL_IP6, ~0);
+ quic_load_openssl3_legacy_provider ();
clib_bitmap_alloc (qm->available_crypto_engines,
app_crypto_engine_n_types ());
quic_register_cipher_suite (CRYPTO_ENGINE_PICOTLS,
diff --git a/src/plugins/quic/quic_crypto.h b/src/plugins/quic/quic_crypto.h
index 2adb20237a3..7299b613053 100644
--- a/src/plugins/quic/quic_crypto.h
+++ b/src/plugins/quic/quic_crypto.h
@@ -18,6 +18,19 @@
#include <quicly.h>
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+#include <openssl/provider.h>
+
+#define quic_load_openssl3_legacy_provider() \
+ do \
+ { \
+ (void) OSSL_PROVIDER_load (NULL, "legacy"); \
+ } \
+ while (0)
+#else
+#define quic_load_openssl3_legacy_provider()
+#endif
+
struct quic_ctx_t;
extern ptls_cipher_suite_t *quic_crypto_cipher_suites[];