1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

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
This commit is contained in:
Alessandro Ghedini 2020-06-08 12:47:05 +01:00 committed by Daniel Stenberg
parent 876e66412a
commit 5277775462
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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)
{