aboutsummaryrefslogtreecommitdiff
path: root/lib/vquic
diff options
context:
space:
mode:
authorAlessandro Ghedini <alessandro@cloudflare.com>2020-06-08 12:47:05 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-06-08 16:09:49 +0200
commit52777754623628f91ee2316acee52e68831f3e02 (patch)
treefd3669b9a2de3ca033c6fc9c9b2066de3473b31d /lib/vquic
parent876e66412a9ebdde8336631c07a02dda6b837b60 (diff)
quiche: update SSLKEYLOGFILE support
quiche now requires the application to explicitly set the keylog path for each connection, rather than reading the environment variable itself. Closes #5541
Diffstat (limited to 'lib/vquic')
-rw-r--r--lib/vquic/quiche.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/vquic/quiche.c b/lib/vquic/quiche.c
index 436249522..9af2d894f 100644
--- a/lib/vquic/quiche.c
+++ b/lib/vquic/quiche.c
@@ -158,6 +158,7 @@ CURLcode Curl_quic_connect(struct connectdata *conn, curl_socket_t sockfd,
CURLcode result;
struct quicsocket *qs = &conn->hequic[sockindex];
struct Curl_easy *data = conn->data;
+ char *keylog_file = NULL;
#ifdef DEBUG_QUICHE
/* initialize debug log callback only once */
@@ -195,7 +196,9 @@ CURLcode Curl_quic_connect(struct connectdata *conn, curl_socket_t sockfd,
if(result)
return result;
- if(getenv("SSLKEYLOGFILE"))
+ keylog_file = getenv("SSLKEYLOGFILE");
+
+ if(keylog_file)
quiche_config_log_keys(qs->cfg);
qs->conn = quiche_connect(conn->host.name, (const uint8_t *) qs->scid,
@@ -205,6 +208,9 @@ CURLcode Curl_quic_connect(struct connectdata *conn, curl_socket_t sockfd,
return CURLE_OUT_OF_MEMORY;
}
+ if(keylog_file)
+ quiche_conn_set_keylog_path(qs->conn, keylog_file);
+
/* Known to not work on Windows */
#if !defined(WIN32) && defined(HAVE_QUICHE_CONN_SET_QLOG_FD)
{