aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl
diff options
context:
space:
mode:
authorSivaprasad Tummala <Sivaprasad.Tummala@intel.com>2021-07-27 17:38:00 +0530
committerFlorin Coras <florin.coras@gmail.com>2021-07-27 19:48:11 +0000
commit39d25e52550b0070602181b2d433d5c5306b98b8 (patch)
treeb3f8c7224df8383f1c2915cef7c3a1e44c498626 /src/vcl
parent9218c60c2bd3bffa5bd79adfe64f048d2976a080 (diff)
vcl: configure the cert-key pair from app
add the cert/key pair as selected by app. Type: fix Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com> Change-Id: I3cef5bebadd8b192a65857d5f4aa6883c2a8d372
Diffstat (limited to 'src/vcl')
-rw-r--r--src/vcl/vcl_bapi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vcl/vcl_bapi.c b/src/vcl/vcl_bapi.c
index 32ded0d9eff..60fbe737a41 100644
--- a/src/vcl/vcl_bapi.c
+++ b/src/vcl/vcl_bapi.c
@@ -425,8 +425,8 @@ static void
vcl_bapi_send_app_add_cert_key_pair (vppcom_cert_key_pair_t *ckpair)
{
vcl_worker_t *wrk = vcl_worker_get_current ();
- u32 cert_len = test_srv_crt_rsa_len;
- u32 key_len = test_srv_key_rsa_len;
+ u32 cert_len = ckpair->cert_len;
+ u32 key_len = ckpair->key_len;
vl_api_app_add_cert_key_pair_t *bmp;
bmp = vl_msg_api_alloc (sizeof (*bmp) + cert_len + key_len);
@@ -437,8 +437,8 @@ vcl_bapi_send_app_add_cert_key_pair (vppcom_cert_key_pair_t *ckpair)
bmp->context = wrk->wrk_index;
bmp->cert_len = clib_host_to_net_u16 (cert_len);
bmp->certkey_len = clib_host_to_net_u16 (key_len + cert_len);
- clib_memcpy_fast (bmp->certkey, test_srv_crt_rsa, cert_len);
- clib_memcpy_fast (bmp->certkey + cert_len, test_srv_key_rsa, key_len);
+ clib_memcpy_fast (bmp->certkey, ckpair->cert, cert_len);
+ clib_memcpy_fast (bmp->certkey + cert_len, ckpair->key, key_len);
vl_msg_api_send_shmem (wrk->vl_input_queue, (u8 *) &bmp);
}