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:
commit
e7d34cf23d
3 changed files with 8 additions and 5 deletions
|
@ -1077,6 +1077,10 @@ 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);
|
||||
|
||||
|
|
|
@ -27,7 +27,8 @@
|
|||
|
||||
#include "lws_config.h"
|
||||
#include "lws_config_private.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(LWS_WITH_CGI) && defined(LWS_HAVE_VFORK) && \
|
||||
!defined(NO_GNU_SOURCE_THIS_TIME) && !defined(_GNU_SOURCE)
|
||||
|
|
|
@ -108,10 +108,8 @@ lws_plat_init(struct lws_context *context,
|
|||
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