summaryrefslogtreecommitdiffstats
path: root/src/plugins/quic
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-04-22 11:48:35 -0700
committerDave Barach <openvpp@barachs.net>2021-04-23 14:59:48 +0000
commite5f18337f1f5d8b8578b6305b7c11276cc5a18a0 (patch)
tree9858c8d7bd7273a685abd646997afd2956e1f913 /src/plugins/quic
parent5724aecd20e8f5e50aba418d2a021ef02275d589 (diff)
tls quic: improve error reporting
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I92f0c1f7c0f4696fa12071440a643aa703d6306f
Diffstat (limited to 'src/plugins/quic')
-rw-r--r--src/plugins/quic/quic.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/quic/quic.c b/src/plugins/quic/quic.c
index cf697278cb7..929d745274f 100644
--- a/src/plugins/quic/quic.c
+++ b/src/plugins/quic/quic.c
@@ -345,7 +345,7 @@ quic_acquire_crypto_context (quic_ctx_t * ctx)
{
QUIC_DBG (1, "Quic does not support crypto engine %d",
ctx->crypto_engine);
- return VNET_API_ERROR_MISSING_CERT_KEY;
+ return SESSION_E_NOCRYPTOENG;
}
/* Check for exisiting crypto ctx */
@@ -377,7 +377,7 @@ quic_acquire_crypto_context (quic_ctx_t * ctx)
error:
quic_crypto_context_free_if_needed (crctx, ctx->c_thread_index);
- return VNET_API_ERROR_MISSING_CERT_KEY;
+ return SESSION_E_NOCRYPTOCKP;
}
/* Helper functions */
@@ -1314,7 +1314,7 @@ quic_connect_connection (session_endpoint_cfg_t * sep)
int error;
if (!sep->ext_cfg)
- return -1;
+ return SESSION_E_NOEXTCFG;
ccfg = &sep->ext_cfg->crypto;
@@ -1455,7 +1455,7 @@ quic_start_listen (u32 quic_listen_session_index, transport_endpoint_t * tep)
sep = (session_endpoint_cfg_t *) tep;
if (!sep->ext_cfg)
- return -1;
+ return SESSION_E_NOEXTCFG;
ccfg = &sep->ext_cfg->crypto;
app_wrk = app_worker_get (sep->app_wrk_index);
@@ -1496,8 +1496,8 @@ quic_start_listen (u32 quic_listen_session_index, transport_endpoint_t * tep)
lctx->c_s_index = quic_listen_session_index;
lctx->crypto_engine = ccfg->crypto_engine;
lctx->ckpair_index = ccfg->ckpair_index;
- if (quic_acquire_crypto_context (lctx))
- return -1;
+ if ((rv = quic_acquire_crypto_context (lctx)))
+ return rv;
QUIC_DBG (2, "Listening UDP session 0x%lx",
session_handle (udp_listen_session));