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:
parent
e7d34cf23d
commit
e2bbca5437
2 changed files with 5 additions and 7 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue