Go to the documentation of this file.
55 Flow *, uint8_t,
void *,
void *,
59 static void DetectSslVersionRegisterTests(
void);
62 static int g_tls_generic_list_id = 0;
94 Flow *f, uint8_t
flags,
void *state,
void *txv,
105 if (app_state == NULL) {
110 if (
flags & STREAM_TOCLIENT) {
111 SCLogDebug(
"server (toclient) version is 0x%02X",
114 }
else if (
flags & STREAM_TOSERVER) {
115 SCLogDebug(
"client (toserver) version is 0x%02X",
160 if (((ver >> 8) & 0xff) == 0x7f)
204 const char *tmp_str =
str;
214 while (tmp_str[0] != 0 && isspace(tmp_str[0])) {
217 if (tmp_str[0] == 0) {
222 while (tmp_str[0] != 0) {
224 if (tmp_str[0] ==
'!') {
230 while (tmp_str[tmp_len] != 0 && !isspace(tmp_str[tmp_len]) && tmp_str[tmp_len] !=
',') {
234 bool is_keyword =
false;
235 for (
size_t i = 0; i <
TLS_SIZE; i++) {
259 }
else if (found != 1 << neg) {
260 SCLogError(
"Invalid value mixing negative and positive forms");
265 while (isspace(tmp_str[0]) || tmp_str[0] ==
',') {
274 DetectSslVersionFree(
de_ctx, ssl);
297 ssl = DetectSslVersionParse(
de_ctx,
str);
305 g_tls_generic_list_id) == NULL) {
312 DetectSslVersionFree(
de_ctx, ssl);
int DetectSignatureSetAppProto(Signature *s, AppProto alproto)
SSLv[2.0|3.[0|1|2|3]] state structure.
SigTableElmt * sigmatch_table
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 *)
@ TLS_VERSION_13_PRE_DRAFT16
Data structures and function prototypes for keeping state for the detection engine.
struct SSLVersionKeywords ssl_version_keywords[TLS_SIZE]
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]
#define SCLogError(...)
Macro used to log ERROR messages.
void DetectSslVersionRegister(void)
Registration function for keyword: ssl_version.
SigMatch * SigMatchAppendSMToList(DetectEngineCtx *de_ctx, Signature *s, uint16_t type, SigMatchCtx *ctx, const int list)
Append a SigMatch to the list type.
#define DETECT_SSL_VERSION_NEGATED
void(* RegisterTests)(void)