aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/hs_apps/vcl/vcl_test_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/hs_apps/vcl/vcl_test_server.c')
-rw-r--r--src/plugins/hs_apps/vcl/vcl_test_server.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/plugins/hs_apps/vcl/vcl_test_server.c b/src/plugins/hs_apps/vcl/vcl_test_server.c
index 798fd72b481..a2a4d6ac3b0 100644
--- a/src/plugins/hs_apps/vcl/vcl_test_server.c
+++ b/src/plugins/hs_apps/vcl/vcl_test_server.c
@@ -553,10 +553,22 @@ vts_worker_init (vcl_test_server_worker_t * wrk)
if (vsm->cfg.proto == VPPCOM_PROTO_TLS
|| vsm->cfg.proto == VPPCOM_PROTO_QUIC)
{
- vppcom_session_tls_add_cert (wrk->listen_fd, vcl_test_crt_rsa,
- vcl_test_crt_rsa_len);
- vppcom_session_tls_add_key (wrk->listen_fd, vcl_test_key_rsa,
- vcl_test_key_rsa_len);
+ vppcom_cert_key_pair_t ckpair;
+ uint32_t ckp_len;
+ int ckp_index;
+
+ vtinf ("Adding tls certs ...");
+ ckpair.cert = vcl_test_crt_rsa;
+ ckpair.key = vcl_test_key_rsa;
+ ckpair.cert_len = vcl_test_crt_rsa_len;
+ ckpair.key_len = vcl_test_key_rsa_len;
+ ckp_index = vppcom_add_cert_key_pair (&ckpair);
+ if (ckp_index < 0)
+ vtfail ("vppcom_add_cert_key_pair()", ckp_index);
+
+ ckp_len = sizeof (ckp_index);
+ vppcom_session_attr (wrk->listen_fd, VPPCOM_ATTR_SET_CKPAIR, &ckp_index,
+ &ckp_len);
}
rv = vppcom_session_bind (wrk->listen_fd, &vsm->cfg.endpt);