1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

sslkeylog: added api in lws to start or stop logging ssl keys as per user input bool flag for respective wsi

This commit is contained in:
AD001\z0048zxj 2024-11-27 12:12:09 +05:30
parent e7d34cf23d
commit e2bbca5437
2 changed files with 5 additions and 7 deletions

View file

@ -1076,10 +1076,6 @@ lws_close_free_wsi(struct lws *wsi, enum lws_close_status reason, const char *ca
{
struct lws_context *cx = wsi->a.context;
struct lws_context_per_thread *pt = &wsi->a.context->pt[(int)wsi->tsi];
/* if the user sets the sniffing flag, populate the key log file */
lws_set_keylog_file(wsi);
/* if the user sets the sniffing flag, populate the key log file */
lws_set_keylog_file(wsi);

View file

@ -106,10 +106,12 @@ lws_plat_init(struct lws_context *context,
#if defined(LWS_HAVE_SSL_CTX_set_keylog_callback) && \
defined(LWS_WITH_TLS) && defined(LWS_WITH_CLIENT)
{
{
char *klf_env = getenv("SSLKEYLOGFILE");
if(klf_env)
lws_strncpy(context->keylog_file, klf_env, sizeof(context->keylog_file));
if (klf_env)
lws_strncpy(context->keylog_file, klf_env,
sizeof(context->keylog_file));
}
#endif