Go to the documentation of this file.
56 Flow *, uint8_t,
void *,
void *,
60 static void DetectSslVersionRegisterTests(
void);
63 static int g_tls_generic_list_id = 0;
95 Flow *f, uint8_t
flags,
void *state,
void *txv,
106 if (app_state == NULL) {
111 if (
flags & STREAM_TOCLIENT) {
112 SCLogDebug(
"server (toclient) version is 0x%02X",
115 }
else if (
flags & STREAM_TOSERVER) {
116 SCLogDebug(
"client (toserver) version is 0x%02X",
161 if (((ver >> 8) & 0xff) == 0x7f)
205 const char *tmp_str =
str;
215 while (tmp_str[0] != 0 && isspace(tmp_str[0])) {
218 if (tmp_str[0] == 0) {
223 while (tmp_str[0] != 0) {
225 if (tmp_str[0] ==
'!') {
231 while (tmp_str[tmp_len] != 0 && !isspace(tmp_str[tmp_len]) && tmp_str[tmp_len] !=
',') {
235 bool is_keyword =
false;
236 for (
size_t i = 0; i <
TLS_SIZE; i++) {
260 }
else if (found != 1 << neg) {
266 while (isspace(tmp_str[0]) || tmp_str[0] ==
',') {
275 DetectSslVersionFree(
de_ctx, ssl);
299 ssl = DetectSslVersionParse(
de_ctx,
str);
310 sm->
ctx = (
void *)ssl;
317 DetectSslVersionFree(
de_ctx, ssl);
int DetectSignatureSetAppProto(Signature *s, AppProto alproto)
SSLv[2.0|3.[0|1|2|3]] state structure.
void(* Free)(DetectEngineCtx *, void *)
SSLStateConnp client_connp
SSLStateConnp server_connp
main detection engine ctx
int(* AppLayerTxMatch)(DetectEngineThreadCtx *, Flow *, uint8_t flags, void *alstate, void *txv, const Signature *, const SigMatchCtx *)
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
Data structures and function prototypes for keeping state for the detection engine.
struct SSLVersionKeywords ssl_version_keywords[TLS_SIZE]
SigMatch * SigMatchAlloc(void)
Used to start a pointer to SigMatch context Should never be dereferenced without casting to something...
int DetectBufferTypeRegister(const char *name)
SSLVersionData data[TLS_SIZE]
SigTableElmt sigmatch_table[DETECT_TBLSIZE]
#define SCLogError(err_code,...)
Macro used to log ERROR messages.
a single match condition for a signature
void DetectSslVersionRegister(void)
Registration function for keyword: ssl_version.
#define DETECT_SSL_VERSION_NEGATED
void SigMatchAppendSMToList(Signature *s, SigMatch *new, int list)
Append a SigMatch to the list type.
@ TLS_VERSION_13_PRE_DRAFT16
void(* RegisterTests)(void)