Go to the documentation of this file.
54 Flow *, uint8_t,
void *,
void *,
58 static void DetectSslVersionRegisterTests(
void);
61 static int g_tls_generic_list_id = 0;
93 Flow *f, uint8_t
flags,
void *state,
void *txv,
100 bool sig_ver =
false;
104 if (app_state == NULL) {
109 if (
flags & STREAM_TOCLIENT) {
110 SCLogDebug(
"server (toclient) version is 0x%02X",
113 }
else if (
flags & STREAM_TOSERVER) {
114 SCLogDebug(
"client (toserver) version is 0x%02X",
145 case TLS_VERSION_13_DRAFT28:
146 case TLS_VERSION_13_DRAFT27:
147 case TLS_VERSION_13_DRAFT26:
148 case TLS_VERSION_13_DRAFT25:
149 case TLS_VERSION_13_DRAFT24:
150 case TLS_VERSION_13_DRAFT23:
151 case TLS_VERSION_13_DRAFT22:
152 case TLS_VERSION_13_DRAFT21:
153 case TLS_VERSION_13_DRAFT20:
154 case TLS_VERSION_13_DRAFT19:
155 case TLS_VERSION_13_DRAFT18:
156 case TLS_VERSION_13_DRAFT17:
157 case TLS_VERSION_13_DRAFT16:
158 case TLS_VERSION_13_PRE_DRAFT16:
200 const char *tmp_str =
str;
209 while (tmp_str[0] != 0 && isspace(tmp_str[0])) {
212 if (tmp_str[0] == 0) {
216 if (tmp_str[0] ==
'!') {
221 while (tmp_str[0] != 0) {
224 while (tmp_str[tmp_len] != 0 && !isspace(tmp_str[tmp_len]) && tmp_str[tmp_len] !=
',') {
228 bool is_keyword =
false;
229 for (
size_t i = 0; i <
TLS_SIZE; i++) {
247 while (isspace(tmp_str[0]) || tmp_str[0] ==
',') {
256 DetectSslVersionFree(
de_ctx, ssl);
285 DetectSslVersionFree(
de_ctx, ssl);
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 SCDetectSignatureSetAppProto(Signature *s, AppProto alproto)
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
SigMatch * SCSigMatchAppendSMToList(DetectEngineCtx *de_ctx, Signature *s, uint16_t type, SigMatchCtx *ctx, const int list)
Append a SigMatch to the list type.
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)
#define SCLogError(...)
Macro used to log ERROR messages.
void DetectSslVersionRegister(void)
Registration function for keyword: ssl_version.
void(* RegisterTests)(void)