suricata
log-tlslog.c File Reference
#include "suricata-common.h"
#include "conf.h"
#include "threadvars.h"
#include "util-print.h"
#include "util-debug.h"
#include "output.h"
#include "log-tlslog.h"
#include "app-layer-ssl.h"
#include "app-layer-parser.h"
#include "util-buffer.h"
#include "util-logopenfile.h"
#include "util-time.h"
#include "log-cf-common.h"
Include dependency graph for log-tlslog.c:

Go to the source code of this file.

Data Structures

struct  LogTlsFileCtx_
 
struct  LogTlsLogThread_
 

Macros

#define DEFAULT_LOG_FILENAME   "tls.log"
 
#define MODULE_NAME   "LogTlsLog"
 
#define PRINT_BUF_LEN   46
 
#define OUTPUT_BUFFER_SIZE   65535
 
#define LOG_TLS_DEFAULT   0
 
#define LOG_TLS_EXTENDED   1
 
#define LOG_TLS_CUSTOM   2
 
#define LOG_TLS_SESSION_RESUMPTION   4
 
#define LOG_TLS_CF_VERSION   'v'
 
#define LOG_TLS_CF_DATE_NOT_BEFORE   'd'
 
#define LOG_TLS_CF_DATE_NOT_AFTER   'D'
 
#define LOG_TLS_CF_SHA1   'f'
 
#define LOG_TLS_CF_SNI   'n'
 
#define LOG_TLS_CF_SUBJECT   's'
 
#define LOG_TLS_CF_ISSUER   'i'
 
#define LOG_TLS_CF_EXTENDED   'E'
 

Typedefs

typedef struct LogTlsFileCtx_ LogTlsFileCtx
 
typedef struct LogTlsLogThread_ LogTlsLogThread
 

Functions

int TLSGetIPInformations (const Packet *p, char *srcip, socklen_t srcip_len, Port *sp, char *dstip, socklen_t dstip_len, Port *dp, int ipproto)
 
void LogTlsLogRegister (void)
 

Detailed Description

Author
Roliers Jean-Paul popof.nosp@m..fpn.nosp@m.@gmai.nosp@m.l.co
Eric Leblond eric@.nosp@m.regi.nosp@m.t.org
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t
Paulo Pacheco fooin.nosp@m.ha@g.nosp@m.mail..nosp@m.com

Implements TLS logging portion of the engine.

Definition in file log-tlslog.c.

Macro Definition Documentation

◆ DEFAULT_LOG_FILENAME

#define DEFAULT_LOG_FILENAME   "tls.log"

Definition at line 48 of file log-tlslog.c.

◆ LOG_TLS_CF_DATE_NOT_AFTER

#define LOG_TLS_CF_DATE_NOT_AFTER   'D'

Definition at line 64 of file log-tlslog.c.

◆ LOG_TLS_CF_DATE_NOT_BEFORE

#define LOG_TLS_CF_DATE_NOT_BEFORE   'd'

Definition at line 63 of file log-tlslog.c.

◆ LOG_TLS_CF_EXTENDED

#define LOG_TLS_CF_EXTENDED   'E'

Definition at line 69 of file log-tlslog.c.

◆ LOG_TLS_CF_ISSUER

#define LOG_TLS_CF_ISSUER   'i'

Definition at line 68 of file log-tlslog.c.

◆ LOG_TLS_CF_SHA1

#define LOG_TLS_CF_SHA1   'f'

Definition at line 65 of file log-tlslog.c.

◆ LOG_TLS_CF_SNI

#define LOG_TLS_CF_SNI   'n'

Definition at line 66 of file log-tlslog.c.

◆ LOG_TLS_CF_SUBJECT

#define LOG_TLS_CF_SUBJECT   's'

Definition at line 67 of file log-tlslog.c.

◆ LOG_TLS_CF_VERSION

#define LOG_TLS_CF_VERSION   'v'

Definition at line 62 of file log-tlslog.c.

◆ LOG_TLS_CUSTOM

#define LOG_TLS_CUSTOM   2

Definition at line 58 of file log-tlslog.c.

◆ LOG_TLS_DEFAULT

#define LOG_TLS_DEFAULT   0

Definition at line 56 of file log-tlslog.c.

◆ LOG_TLS_EXTENDED

#define LOG_TLS_EXTENDED   1

Definition at line 57 of file log-tlslog.c.

◆ LOG_TLS_SESSION_RESUMPTION

#define LOG_TLS_SESSION_RESUMPTION   4

Definition at line 60 of file log-tlslog.c.

◆ MODULE_NAME

#define MODULE_NAME   "LogTlsLog"

Definition at line 50 of file log-tlslog.c.

◆ OUTPUT_BUFFER_SIZE

#define OUTPUT_BUFFER_SIZE   65535

Definition at line 54 of file log-tlslog.c.

◆ PRINT_BUF_LEN

#define PRINT_BUF_LEN   46

Definition at line 52 of file log-tlslog.c.

Typedef Documentation

◆ LogTlsFileCtx

typedef struct LogTlsFileCtx_ LogTlsFileCtx

◆ LogTlsLogThread

Function Documentation

◆ LogTlsLogRegister()

void LogTlsLogRegister ( void  )

Definition at line 500 of file log-tlslog.c.

References LOGGER_TLS, MODULE_NAME, and OutputRegisterTxModuleWithProgress().

Here is the call graph for this function:

◆ TLSGetIPInformations()

int TLSGetIPInformations ( const Packet p,
char *  srcip,
socklen_t  srcip_len,
Port sp,
char *  dstip,
socklen_t  dstip_len,
Port dp,
int  ipproto 
)

Definition at line 81 of file log-tlslog.c.

References Packet_::dp, GET_IPV4_DST_ADDR_PTR, GET_IPV4_SRC_ADDR_PTR, GET_IPV6_DST_ADDR, GET_IPV6_SRC_ADDR, PKT_IS_TOSERVER, PrintInet(), and Packet_::sp.

Here is the call graph for this function: