mirror of
https://github.com/curl/curl.git
synced 2025-02-23 15:10:03 +08: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:
parent
876e66412a
commit
5277775462
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user