suricata
detect-tls-version.c File Reference
#include "suricata-common.h"
#include "threads.h"
#include "debug.h"
#include "decode.h"
#include "detect.h"
#include "detect-parse.h"
#include "detect-engine.h"
#include "detect-engine-mpm.h"
#include "detect-engine-state.h"
#include "flow.h"
#include "flow-var.h"
#include "flow-util.h"
#include "util-debug.h"
#include "util-unittest.h"
#include "util-unittest-helper.h"
#include "app-layer.h"
#include "app-layer-parser.h"
#include "app-layer-ssl.h"
#include "detect-tls-version.h"
#include "stream-tcp.h"
#include "stream-tcp-reassemble.h"
Include dependency graph for detect-tls-version.c:

Go to the source code of this file.

Macros

#define PARSE_REGEX   "^\\s*([A-z0-9\\.]+|\"[A-z0-9\\.]+\")\\s*$"
 Regex for parsing "id" option, matching number or "number". More...
 
#define MAX_SUBSTRINGS   30
 

Functions

void DetectTlsVersionRegister (void)
 Registration function for keyword: tls.version. More...
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

Implements the tls.version keyword

Definition in file detect-tls-version.c.

Macro Definition Documentation

#define MAX_SUBSTRINGS   30
#define PARSE_REGEX   "^\\s*([A-z0-9\\.]+|\"[A-z0-9\\.]+\")\\s*$"

Regex for parsing "id" option, matching number or "number".

Definition at line 57 of file detect-tls-version.c.

Referenced by DetectTlsVersionRegister().

Function Documentation

void DetectTlsVersionRegister ( void  )

Registration function for keyword: tls.version.

Definition at line 73 of file detect-tls-version.c.

References Flow_::alproto, ALPROTO_TLS, Flow_::alstate, AppLayerParserParse(), AppLayerParserThreadCtxAlloc(), AppLayerParserThreadCtxFree(), SigTableElmt_::AppLayerTxMatch, SSLState_::client_connp, SSLStateConnp_::content_type, SigMatch_::ctx, DE_QUIET, SigTableElmt_::desc, DETECT_AL_TLS_VERSION, DETECT_TLS_VERSION_FLAG_RAW, DetectBufferTypeRegister(), DetectEngineCtxFree(), DetectEngineCtxInit(), DetectEngineThreadCtxDeinit(), DetectEngineThreadCtxInit(), DetectSetupParseRegexes(), DetectSignatureSetAppProto(), DOC_URL, DOC_VERSION, FAIL_IF, FAIL_IF_NOT, FAIL_IF_NOT_NULL, FAIL_IF_NULL, DetectTlsVersionData_::flags, flags, Packet_::flags, DetectEngineCtx_::flags, Packet_::flow, FLOW_DESTROY, FLOW_INITIALIZE, FLOW_PKT_ESTABLISHED, FLOW_PKT_TOSERVER, Packet_::flowflags, FLOWLOCK_UNLOCK, FLOWLOCK_WRLOCK, SigTableElmt_::Free, m, MAX_SUBSTRINGS, SigTableElmt_::name, PacketAlertCheck(), PARSE_REGEX, PASS, PKT_HAS_FLOW, PKT_STREAM_EST, Flow_::proto, Flow_::protoctx, SigTableElmt_::RegisterTests, res, SC_ERR_INVALID_VALUE, SC_ERR_PCRE_GET_SUBSTRING, SC_ERR_PCRE_MATCH, SCCalloc, SCEnter, SCFree, SCLogDebug, SCLogError, SCReturnInt, SCStrdup, SSLState_::server_connp, SigTableElmt_::Setup, DetectEngineCtx_::sig_list, SigCleanSignatures(), SigGroupBuild(), SigGroupCleanup(), SigInit(), sigmatch_table, SigMatchAlloc(), SigMatchAppendSMToList(), SigMatchSignatures(), str, STREAM_TOCLIENT, STREAM_TOSERVER, StreamTcpFreeConfig(), StreamTcpInitConfig(), TLS_VERSION_10, TLS_VERSION_11, TLS_VERSION_12, TLS_VERSION_13, TRUE, SigMatch_::type, unlikely, SigTableElmt_::url, UTHBuildPacket(), UTHFreePackets(), UtRegisterTest(), DetectTlsVersionData_::ver, SSLStateConnp_::version, and version.

Referenced by SigTableSetup().

Here is the call graph for this function:

Here is the caller graph for this function: