|
|
|
@ -213,8 +213,6 @@ static TmEcode JsonTlsLogThreadDeinit(ThreadVars *t, void *data)
|
|
|
|
|
|
|
|
|
|
static void OutputTlsLogDeinit(OutputCtx *output_ctx)
|
|
|
|
|
{
|
|
|
|
|
OutputTlsLoggerDisable();
|
|
|
|
|
|
|
|
|
|
OutputTlsCtx *tls_ctx = output_ctx->data;
|
|
|
|
|
LogFileCtx *logfile_ctx = tls_ctx->file_ctx;
|
|
|
|
|
LogFileFreeCtx(logfile_ctx);
|
|
|
|
@ -225,12 +223,6 @@ static void OutputTlsLogDeinit(OutputCtx *output_ctx)
|
|
|
|
|
#define DEFAULT_LOG_FILENAME "tls.json"
|
|
|
|
|
OutputCtx *OutputTlsLogInit(ConfNode *conf)
|
|
|
|
|
{
|
|
|
|
|
if (OutputTlsLoggerEnable() != 0) {
|
|
|
|
|
SCLogError(SC_ERR_CONF_YAML_ERROR, "only one 'tls' logger "
|
|
|
|
|
"can be enabled");
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LogFileCtx *file_ctx = LogFileNewCtx();
|
|
|
|
|
if(file_ctx == NULL) {
|
|
|
|
|
SCLogError(SC_ERR_TLS_LOG_GENERIC, "couldn't create new file_ctx");
|
|
|
|
@ -277,8 +269,6 @@ OutputCtx *OutputTlsLogInit(ConfNode *conf)
|
|
|
|
|
|
|
|
|
|
static void OutputTlsLogDeinitSub(OutputCtx *output_ctx)
|
|
|
|
|
{
|
|
|
|
|
OutputTlsLoggerDisable();
|
|
|
|
|
|
|
|
|
|
OutputTlsCtx *tls_ctx = output_ctx->data;
|
|
|
|
|
SCFree(tls_ctx);
|
|
|
|
|
SCFree(output_ctx);
|
|
|
|
@ -288,12 +278,6 @@ OutputCtx *OutputTlsLogInitSub(ConfNode *conf, OutputCtx *parent_ctx)
|
|
|
|
|
{
|
|
|
|
|
OutputJsonCtx *ojc = parent_ctx->data;
|
|
|
|
|
|
|
|
|
|
if (OutputTlsLoggerEnable() != 0) {
|
|
|
|
|
SCLogError(SC_ERR_CONF_YAML_ERROR, "only one 'tls' logger "
|
|
|
|
|
"can be enabled");
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
OutputTlsCtx *tls_ctx = SCMalloc(sizeof(OutputTlsCtx));
|
|
|
|
|
if (unlikely(tls_ctx == NULL))
|
|
|
|
|
return NULL;
|
|
|
|
|