#define SSL_AL_FLAG_STATE_SERVER_KEYX 0x1000
#define SSL_AL_FLAG_STATE_UNKNOWN 0x2000
-#define SSL_AL_FLAG_STATE_LOGGED 0x4000
-
/* flag to indicate that session is finished */
#define SSL_AL_FLAG_STATE_FINISHED 0x4000
static void LogTlsLogDeInitCtx(OutputCtx *output_ctx)
{
- OutputTlsLoggerDisable();
-
LogTlsFileCtx *tlslog_ctx = (LogTlsFileCtx *) output_ctx->data;
LogFileFreeCtx(tlslog_ctx->file_ctx);
SCFree(tlslog_ctx);
* */
static OutputCtx *LogTlsLogInitCtx(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) {
static void OutputTlsLogDeinit(OutputCtx *output_ctx)
{
- OutputTlsLoggerDisable();
-
OutputTlsCtx *tls_ctx = output_ctx->data;
LogFileCtx *logfile_ctx = tls_ctx->file_ctx;
LogFileFreeCtx(logfile_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");
static void OutputTlsLogDeinitSub(OutputCtx *output_ctx)
{
- OutputTlsLoggerDisable();
-
OutputTlsCtx *tls_ctx = output_ctx->data;
SCFree(tls_ctx);
SCFree(output_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;
drop_loggers--;
}
-static int tls_loggers = 0;
-
-int OutputTlsLoggerEnable(void)
-{
- if (tls_loggers)
- return -1;
- tls_loggers++;
- return 0;
-}
-
-void OutputTlsLoggerDisable(void)
-{
- if (tls_loggers)
- tls_loggers--;
-}
-
static int ssh_loggers = 0;
int OutputSshLoggerEnable(void)
int OutputDropLoggerEnable(void);
void OutputDropLoggerDisable(void);
-int OutputTlsLoggerEnable(void);
-void OutputTlsLoggerDisable(void);
-
int OutputSshLoggerEnable(void);
void OutputSshLoggerDisable(void);