suricata
detect-tls-certs.c
Go to the documentation of this file.
1 /* Copyright (C) 2019-2022 Open Information Security Foundation
2  *
3  * You can copy, redistribute or modify this Program under the terms of
4  * the GNU General Public License version 2 as published by the Free
5  * Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * version 2 along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15  * 02110-1301, USA.
16  */
17 
18 /**
19  * \file
20  *
21  * \author Mats Klepsland <mats.klepsland@gmail.com>
22  *
23  * Implements support for tls.certs keyword.
24  */
25 
26 #include "suricata-common.h"
27 #include "threads.h"
28 #include "decode.h"
29 #include "detect.h"
30 
31 #include "detect-parse.h"
32 #include "detect-engine.h"
33 #include "detect-engine-mpm.h"
36 #include "detect-content.h"
37 #include "detect-pcre.h"
38 #include "detect-tls-certs.h"
39 #include "detect-engine-uint.h"
40 
41 #include "flow.h"
42 #include "flow-util.h"
43 #include "flow-var.h"
44 
45 #include "util-debug.h"
46 #include "util-unittest.h"
47 #include "util-spm.h"
48 #include "util-print.h"
49 
50 #include "stream-tcp.h"
51 
52 #include "app-layer.h"
53 #include "app-layer-ssl.h"
54 
55 #include "util-profiling.h"
56 #include "util-unittest.h"
57 #include "util-unittest-helper.h"
58 
59 static int DetectTlsCertsSetup(DetectEngineCtx *, Signature *, const char *);
60 #ifdef UNITTESTS
61 static void DetectTlsCertsRegisterTests(void);
62 #endif
63 static uint8_t DetectEngineInspectTlsCerts(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
64  const DetectEngineAppInspectionEngine *engine, const Signature *s, Flow *f, uint8_t flags,
65  void *alstate, void *txv, uint64_t tx_id);
66 static int PrefilterMpmTlsCertsRegister(DetectEngineCtx *de_ctx,
67  SigGroupHead *sgh, MpmCtx *mpm_ctx,
68  const DetectBufferMpmRegistery *mpm_reg, int list_id);
69 
70 static int g_tls_certs_buffer_id = 0;
71 
73  uint32_t local_id; /**< used as index into thread inspect array */
75 };
76 
77 typedef struct PrefilterMpmTlsCerts {
78  int list_id;
79  const MpmCtx *mpm_ctx;
82 
83 /**
84  * \brief Registration function for keyword: tls.certs
85  */
87 {
89  sigmatch_table[DETECT_AL_TLS_CERTS].desc = "sticky buffer to match the TLS certificate buffer";
90  sigmatch_table[DETECT_AL_TLS_CERTS].url = "/rules/tls-keywords.html#tls-certs";
91  sigmatch_table[DETECT_AL_TLS_CERTS].Setup = DetectTlsCertsSetup;
92 #ifdef UNITTESTS
93  sigmatch_table[DETECT_AL_TLS_CERTS].RegisterTests = DetectTlsCertsRegisterTests;
94 #endif
97 
100  DetectEngineInspectTlsCerts, NULL);
101 
103  PrefilterMpmTlsCertsRegister, NULL, ALPROTO_TLS,
105 
106  DetectBufferTypeSetDescriptionByName("tls.certs", "TLS certificate");
107 
108  g_tls_certs_buffer_id = DetectBufferTypeGetByName("tls.certs");
109 }
110 
111 /**
112  * \brief This function setup the tls.certs modifier keyword
113  *
114  * \param de_ctx Pointer to the Detect Engine Context
115  * \param s Pointer to the Signature to which the keyword belongs
116  * \param str Should hold an empty string always
117  *
118  * \retval 0 On success
119  * \retval -1 On failure
120  */
121 static int DetectTlsCertsSetup(DetectEngineCtx *de_ctx, Signature *s,
122  const char *str)
123 {
124  if (DetectBufferSetActiveList(s, g_tls_certs_buffer_id) < 0)
125  return -1;
126 
128  return -1;
129 
130  return 0;
131 }
132 
133 static InspectionBuffer *TlsCertsGetData(DetectEngineThreadCtx *det_ctx,
134  const DetectEngineTransforms *transforms, Flow *f,
135  struct TlsCertsGetDataArgs *cbdata, int list_id)
136 {
137  SCEnter();
138 
139  InspectionBuffer *buffer =
140  InspectionBufferMultipleForListGet(det_ctx, list_id, cbdata->local_id);
141  if (buffer == NULL)
142  return NULL;
143 
144  const SSLState *ssl_state = (SSLState *)f->alstate;
145 
146  if (TAILQ_EMPTY(&ssl_state->server_connp.certs)) {
147  return NULL;
148  }
149 
150  if (cbdata->cert == NULL) {
151  cbdata->cert = TAILQ_FIRST(&ssl_state->server_connp.certs);
152  } else {
153  cbdata->cert = TAILQ_NEXT(cbdata->cert, next);
154  }
155  if (cbdata->cert == NULL) {
156  return NULL;
157  }
158 
159  InspectionBufferSetupMulti(buffer, transforms, cbdata->cert->cert_data, cbdata->cert->cert_len);
160 
161  SCReturnPtr(buffer, "InspectionBuffer");
162 }
163 
164 static uint8_t DetectEngineInspectTlsCerts(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
165  const DetectEngineAppInspectionEngine *engine, const Signature *s, Flow *f, uint8_t flags,
166  void *alstate, void *txv, uint64_t tx_id)
167 {
168  const DetectEngineTransforms *transforms = NULL;
169  if (!engine->mpm) {
170  transforms = engine->v2.transforms;
171  }
172 
173  struct TlsCertsGetDataArgs cbdata = { 0, NULL };
174 
175  while (1)
176  {
177  InspectionBuffer *buffer = TlsCertsGetData(det_ctx, transforms, f,
178  &cbdata, engine->sm_list);
179  if (buffer == NULL || buffer->inspect == NULL)
180  break;
181 
182  det_ctx->buffer_offset = 0;
183  det_ctx->discontinue_matching = 0;
184  det_ctx->inspection_recursion_counter = 0;
185 
186  const int match = DetectEngineContentInspection(de_ctx, det_ctx, s, engine->smd,
187  NULL, f, (uint8_t *)buffer->inspect,
188  buffer->inspect_len,
191  if (match == 1) {
193  }
194 
195  cbdata.local_id++;
196  }
197 
199 }
200 
201 static void PrefilterTxTlsCerts(DetectEngineThreadCtx *det_ctx,
202  const void *pectx, Packet *p, Flow *f, void *txv,
203  const uint64_t idx, const uint8_t flags)
204 {
205  SCEnter();
206 
207  const PrefilterMpmTlsCerts *ctx = (const PrefilterMpmTlsCerts *)pectx;
208  const MpmCtx *mpm_ctx = ctx->mpm_ctx;
209  const int list_id = ctx->list_id;
210 
211  struct TlsCertsGetDataArgs cbdata = { 0, NULL };
212 
213  while (1)
214  {
215  InspectionBuffer *buffer = TlsCertsGetData(det_ctx, ctx->transforms,
216  f, &cbdata, list_id);
217  if (buffer == NULL)
218  break;
219 
220  if (buffer->inspect_len >= mpm_ctx->minlen) {
221  (void)mpm_table[mpm_ctx->mpm_type].Search(mpm_ctx,
222  &det_ctx->mtcu, &det_ctx->pmq,
223  buffer->inspect, buffer->inspect_len);
224  PREFILTER_PROFILING_ADD_BYTES(det_ctx, buffer->inspect_len);
225  }
226 
227  cbdata.local_id++;
228  }
229 }
230 
231 static void PrefilterMpmTlsCertsFree(void *ptr)
232 {
233  SCFree(ptr);
234 }
235 
236 static int PrefilterMpmTlsCertsRegister(DetectEngineCtx *de_ctx,
237  SigGroupHead *sgh, MpmCtx *mpm_ctx,
238  const DetectBufferMpmRegistery *mpm_reg, int list_id)
239 {
240  PrefilterMpmTlsCerts *pectx = SCCalloc(1, sizeof(*pectx));
241  if (pectx == NULL)
242  return -1;
243 
244  pectx->list_id = list_id;
245  pectx->mpm_ctx = mpm_ctx;
246  pectx->transforms = &mpm_reg->transforms;
247 
248  return PrefilterAppendTxEngine(de_ctx, sgh, PrefilterTxTlsCerts,
249  mpm_reg->app_v2.alproto, mpm_reg->app_v2.tx_min_progress,
250  pectx, PrefilterMpmTlsCertsFree, mpm_reg->name);
251 }
252 
253 static int g_tls_cert_buffer_id = 0;
254 #define BUFFER_NAME "tls_validity"
255 #define KEYWORD_ID DETECT_AL_TLS_CHAIN_LEN
256 #define KEYWORD_NAME "tls.cert_chain_len"
257 #define KEYWORD_DESC "match TLS certificate chain length"
258 #define KEYWORD_URL "/rules/tls-keywords.html#tls-cert-chain-len"
259 
260 /**
261  * \internal
262  * \brief Function to match cert chain length in TLS
263  *
264  * \param t Pointer to thread vars.
265  * \param det_ctx Pointer to the pattern matcher thread.
266  * \param f Pointer to the current flow.
267  * \param flags Flags.
268  * \param state App layer state.
269  * \param s Pointer to the Signature.
270  * \param m Pointer to the sigmatch that we will cast into
271  * DetectU64Data.
272  *
273  * \retval 0 no match.
274  * \retval 1 match.
275  */
276 static int DetectTLSCertChainLenMatch(DetectEngineThreadCtx *det_ctx, Flow *f, uint8_t flags,
277  void *state, void *txv, const Signature *s, const SigMatchCtx *ctx)
278 {
279  SCEnter();
280 
281  SSLState *ssl_state = state;
282  if (flags & STREAM_TOCLIENT) {
283  SSLStateConnp *connp = &ssl_state->server_connp;
284  uint32_t cnt = 0;
286  TAILQ_FOREACH (cert, &connp->certs, next) {
287  cnt++;
288  }
289  SCLogDebug("%u certs in chain", cnt);
290 
291  const DetectU32Data *dd = (const DetectU32Data *)ctx;
292  if (DetectU32Match(cnt, dd)) {
293  SCReturnInt(1);
294  }
295  }
296  SCReturnInt(0);
297 }
298 
299 /**
300  * \internal
301  * \brief Function to free memory associated with DetectU64Data.
302  *
303  * \param de_ptr Pointer to DetectU64Data.
304  */
305 static void DetectTLSCertChainLenFree(DetectEngineCtx *de_ctx, void *ptr)
306 {
307  rs_detect_u32_free(ptr);
308 }
309 
310 /**
311  * \brief Function to add the parsed tls cert chain len field into the current signature.
312  *
313  * \param de_ctx Pointer to the Detection Engine Context.
314  * \param s Pointer to the Current Signature.
315  * \param rawstr Pointer to the user provided flags options.
316  * \param type Defines if this is notBefore or notAfter.
317  *
318  * \retval 0 on Success.
319  * \retval -1 on Failure.
320  */
321 static int DetectTLSCertChainLenSetup(DetectEngineCtx *de_ctx, Signature *s, const char *rawstr)
322 {
324  return -1;
325 
326  DetectU32Data *dd = DetectU32Parse(rawstr);
327  if (dd == NULL) {
328  SCLogError(SC_ERR_INVALID_ARGUMENT, "Parsing \'%s\' failed for %s", rawstr,
329  sigmatch_table[KEYWORD_ID].name);
330  return -1;
331  }
332 
333  SigMatch *sm = SigMatchAlloc();
334  if (sm == NULL) {
335  rs_detect_u32_free(dd);
336  return -1;
337  }
338  sm->type = KEYWORD_ID;
339  sm->ctx = (void *)dd;
340 
341  SigMatchAppendSMToList(s, sm, g_tls_cert_buffer_id);
342  return 0;
343 }
344 
346 {
350  sigmatch_table[KEYWORD_ID].AppLayerTxMatch = DetectTLSCertChainLenMatch;
351  sigmatch_table[KEYWORD_ID].Setup = DetectTLSCertChainLenSetup;
352  sigmatch_table[KEYWORD_ID].Free = DetectTLSCertChainLenFree;
353 
356 
357  g_tls_cert_buffer_id = DetectBufferTypeGetByName(BUFFER_NAME);
358 }
359 
360 #ifdef UNITTESTS
361 #include "tests/detect-tls-certs.c"
362 #endif
detect-engine-uint.h
DetectEngineAppInspectionEngine_
Definition: detect.h:390
SigTableElmt_::url
const char * url
Definition: detect.h:1248
DetectSignatureSetAppProto
int DetectSignatureSetAppProto(Signature *s, AppProto alproto)
Definition: detect-parse.c:1490
SSLState_
SSLv[2.0|3.[0|1|2|3]] state structure.
Definition: app-layer-ssl.h:288
DetectEngineAppInspectionEngine_::mpm
bool mpm
Definition: detect.h:394
detect-content.h
MpmCtx_::mpm_type
uint8_t mpm_type
Definition: util-mpm.h:90
DetectEngineThreadCtx_::buffer_offset
uint32_t buffer_offset
Definition: detect.h:1062
detect-engine.h
SIGMATCH_INFO_STICKY_BUFFER
#define SIGMATCH_INFO_STICKY_BUFFER
Definition: detect.h:1455
DetectU32Match
int DetectU32Match(const uint32_t parg, const DetectUintData_u32 *du32)
Definition: detect-engine-uint.c:31
SSLCertsChain_::cert_len
uint32_t cert_len
Definition: app-layer-ssl.h:226
SigTableElmt_::desc
const char * desc
Definition: detect.h:1247
DETECT_ENGINE_CONTENT_INSPECTION_MODE_STATE
@ DETECT_ENGINE_CONTENT_INSPECTION_MODE_STATE
Definition: detect-engine-content-inspection.h:36
SigTableElmt_::Free
void(* Free)(DetectEngineCtx *, void *)
Definition: detect.h:1235
flow-util.h
SigTableElmt_::name
const char * name
Definition: detect.h:1245
stream-tcp.h
SigGroupHead_
Container for matching data for a signature group.
Definition: detect.h:1403
DETECT_AL_TLS_CERTS
@ DETECT_AL_TLS_CERTS
Definition: detect-engine-register.h:222
DetectEngineTransforms
Definition: detect.h:372
ALPROTO_TLS
@ ALPROTO_TLS
Definition: app-layer-protos.h:33
SCLogDebug
#define SCLogDebug(...)
Definition: util-debug.h:296
DetectU32Parse
DetectUintData_u32 * DetectU32Parse(const char *u32str)
This function is used to parse u32 options passed via some u32 keyword.
Definition: detect-engine-uint.c:45
next
struct HtpBodyChunk_ * next
Definition: app-layer-htp.h:0
SSLState_::server_connp
SSLStateConnp server_connp
Definition: app-layer-ssl.h:306
SSLStateConnp_
Definition: app-layer-ssl.h:231
DetectBufferMpmRegistery_::transforms
DetectEngineTransforms transforms
Definition: detect.h:640
InspectionBuffer
Definition: detect.h:338
KEYWORD_NAME
#define KEYWORD_NAME
Definition: detect-tls-certs.c:256
threads.h
Flow_
Flow data structure.
Definition: flow.h:353
DetectEngineThreadCtx_::pmq
PrefilterRuleStore pmq
Definition: detect.h:1141
SigTableElmt_::flags
uint16_t flags
Definition: detect.h:1239
DetectBufferMpmRegistery_::app_v2
struct DetectBufferMpmRegistery_::@87::@89 app_v2
DetectEngineCtx_
main detection engine ctx
Definition: detect.h:785
TAILQ_EMPTY
#define TAILQ_EMPTY(head)
Definition: queue.h:248
TAILQ_FOREACH
#define TAILQ_FOREACH(var, head, field)
Definition: queue.h:252
SigTableElmt_::AppLayerTxMatch
int(* AppLayerTxMatch)(DetectEngineThreadCtx *, Flow *, uint8_t flags, void *alstate, void *txv, const Signature *, const SigMatchCtx *)
Definition: detect.h:1216
TlsCertsGetDataArgs
Definition: detect-tls-certs.c:72
DetectBufferMpmRegistery_
one time registration of keywords at start up
Definition: detect.h:626
TLS_STATE_CERT_READY
@ TLS_STATE_CERT_READY
Definition: app-layer-ssl.h:78
SIG_FLAG_TOCLIENT
#define SIG_FLAG_TOCLIENT
Definition: detect.h:231
PrefilterMpmTlsCerts
struct PrefilterMpmTlsCerts PrefilterMpmTlsCerts
SigTableElmt_::Setup
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
Definition: detect.h:1230
detect-pcre.h
DetectEngineAppInspectionEngine_::v2
struct DetectEngineAppInspectionEngine_::@84 v2
detect-engine-prefilter.h
DetectEngineThreadCtx_::mtcu
MpmThreadCtx mtcu
Definition: detect.h:1139
util-unittest.h
util-unittest-helper.h
KEYWORD_ID
#define KEYWORD_ID
Definition: detect-tls-certs.c:255
DetectBufferTypeGetByName
int DetectBufferTypeGetByName(const char *name)
Definition: detect-engine.c:1086
DetectEngineAppInspectionEngine_::sm_list
uint16_t sm_list
Definition: detect.h:396
KEYWORD_DESC
#define KEYWORD_DESC
Definition: detect-tls-certs.c:257
TlsCertsGetDataArgs::cert
SSLCertsChain * cert
Definition: detect-tls-certs.c:74
decode.h
util-debug.h
TAILQ_FIRST
#define TAILQ_FIRST(head)
Definition: queue.h:250
de_ctx
DetectEngineCtx * de_ctx
Definition: fuzz_siginit.c:17
DetectEngineThreadCtx_
Definition: detect.h:1034
SSLCertsChain_
Definition: app-layer-ssl.h:224
util-print.h
SCEnter
#define SCEnter(...)
Definition: util-debug.h:298
detect-engine-mpm.h
detect.h
DETECT_ENGINE_INSPECT_SIG_MATCH
#define DETECT_ENGINE_INSPECT_SIG_MATCH
Definition: detect-engine-state.h:39
InspectionBuffer::inspect_offset
uint64_t inspect_offset
Definition: detect.h:340
BUFFER_NAME
#define BUFFER_NAME
Definition: detect-tls-certs.c:254
SC_ERR_INVALID_ARGUMENT
@ SC_ERR_INVALID_ARGUMENT
Definition: util-error.h:43
MpmCtx_::minlen
uint16_t minlen
Definition: util-mpm.h:99
SigMatch_::ctx
SigMatchCtx * ctx
Definition: detect.h:317
util-profiling.h
DetectBufferMpmRegistery_::name
const char * name
Definition: detect.h:627
Packet_
Definition: decode.h:434
DetectAppLayerInspectEngineRegister2
void DetectAppLayerInspectEngineRegister2(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr2 Callback2, InspectionBufferGetDataPtr GetData)
register inspect engine at start up time
Definition: detect-engine.c:227
SCReturnPtr
#define SCReturnPtr(x, type)
Definition: util-debug.h:314
PrefilterMpmTlsCerts::mpm_ctx
const MpmCtx * mpm_ctx
Definition: detect-tls-certs.c:79
DetectTlsCertsRegister
void DetectTlsCertsRegister(void)
Registration function for keyword: tls.certs.
Definition: detect-tls-certs.c:86
SSLCertsChain_::cert_data
uint8_t * cert_data
Definition: app-layer-ssl.h:225
MpmTableElmt_::Search
uint32_t(* Search)(const struct MpmCtx_ *, struct MpmThreadCtx_ *, PrefilterRuleStore *, const uint8_t *, uint32_t)
Definition: util-mpm.h:165
SigMatchAlloc
SigMatch * SigMatchAlloc(void)
Definition: detect-parse.c:235
detect-engine-content-inspection.h
SigMatchCtx_
Used to start a pointer to SigMatch context Should never be dereferenced without casting to something...
Definition: detect.h:309
DetectEngineThreadCtx_::discontinue_matching
uint16_t discontinue_matching
Definition: detect.h:1101
DetectEngineAppInspectionEngine_::smd
SigMatchData * smd
Definition: detect.h:407
DetectEngineContentInspection
uint8_t DetectEngineContentInspection(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, const Signature *s, const SigMatchData *smd, Packet *p, Flow *f, const uint8_t *buffer, uint32_t buffer_len, uint32_t stream_start_offset, uint8_t flags, uint8_t inspection_mode)
Run the actual payload match functions.
Definition: detect-engine-content-inspection.c:104
detect-tls-certs.c
DetectAppLayerMpmRegister2
void DetectAppLayerMpmRegister2(const char *name, int direction, int priority, int(*PrefilterRegister)(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistery *mpm_reg, int list_id), InspectionBufferGetDataPtr GetData, AppProto alproto, int tx_min_progress)
register a MPM engine
Definition: detect-engine-mpm.c:89
PREFILTER_PROFILING_ADD_BYTES
#define PREFILTER_PROFILING_ADD_BYTES(det_ctx, bytes)
Definition: util-profiling.h:304
DETECT_CI_FLAGS_SINGLE
#define DETECT_CI_FLAGS_SINGLE
Definition: detect-engine-content-inspection.h:47
flags
uint8_t flags
Definition: decode-gre.h:0
suricata-common.h
PrefilterMpmTlsCerts::list_id
int list_id
Definition: detect-tls-certs.c:78
SigMatch_::type
uint16_t type
Definition: detect.h:315
sigmatch_table
SigTableElmt sigmatch_table[DETECT_TBLSIZE]
Definition: detect-parse.c:73
DetectEngineThreadCtx_::inspection_recursion_counter
int inspection_recursion_counter
Definition: detect.h:1118
DetectU32Data
DetectUintData_u32 DetectU32Data
Definition: detect-engine-uint.h:41
TAILQ_NEXT
#define TAILQ_NEXT(elm, field)
Definition: queue.h:307
util-spm.h
SCLogError
#define SCLogError(err_code,...)
Macro used to log ERROR messages.
Definition: util-debug.h:255
PrefilterMpmTlsCerts
Definition: detect-tls-certs.c:77
InspectionBufferSetupMulti
void InspectionBufferSetupMulti(InspectionBuffer *buffer, const DetectEngineTransforms *transforms, const uint8_t *data, const uint32_t data_len)
setup the buffer with our initial data
Definition: detect-engine.c:1436
DetectEngineInspectGenericList
uint8_t DetectEngineInspectGenericList(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, const struct DetectEngineAppInspectionEngine_ *engine, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id)
Do the content inspection & validation for a signature.
Definition: detect-engine.c:1951
DETECT_ENGINE_INSPECT_SIG_NO_MATCH
#define DETECT_ENGINE_INSPECT_SIG_NO_MATCH
Definition: detect-engine-state.h:38
KEYWORD_URL
#define KEYWORD_URL
Definition: detect-tls-certs.c:258
detect-tls-certs.h
InspectionBuffer::inspect_len
uint32_t inspect_len
Definition: detect.h:341
InspectionBuffer::inspect
const uint8_t * inspect
Definition: detect.h:339
str
#define str(s)
Definition: suricata-common.h:272
SCFree
#define SCFree(p)
Definition: util-mem.h:61
Flow_::alstate
void * alstate
Definition: flow.h:486
detect-parse.h
Signature_
Signature container.
Definition: detect.h:540
SigMatch_
a single match condition for a signature
Definition: detect.h:314
PrefilterAppendTxEngine
int PrefilterAppendTxEngine(DetectEngineCtx *de_ctx, SigGroupHead *sgh, void(*PrefilterTxFunc)(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p, Flow *f, void *tx, const uint64_t idx, const uint8_t flags), AppProto alproto, int tx_min_progress, void *pectx, void(*FreeFunc)(void *pectx), const char *name)
Definition: detect-engine-prefilter.c:270
DetectEngineAppInspectionEngine_::transforms
const DetectEngineTransforms * transforms
Definition: detect.h:404
PrefilterMpmTlsCerts::transforms
const DetectEngineTransforms * transforms
Definition: detect-tls-certs.c:80
mpm_table
MpmTableElmt mpm_table[MPM_TABLE_SIZE]
Definition: util-mpm.c:48
DetectTlsCertChainLenRegister
void DetectTlsCertChainLenRegister(void)
Definition: detect-tls-certs.c:345
TlsCertsGetDataArgs::local_id
uint32_t local_id
Definition: detect-tls-certs.c:73
InspectionBufferMultipleForListGet
InspectionBuffer * InspectionBufferMultipleForListGet(DetectEngineThreadCtx *det_ctx, const int list_id, const uint32_t local_id)
for a InspectionBufferMultipleForList get a InspectionBuffer
Definition: detect-engine.c:1389
SIGMATCH_NOOPT
#define SIGMATCH_NOOPT
Definition: detect.h:1431
DetectBufferSetActiveList
int DetectBufferSetActiveList(Signature *s, const int list)
Definition: detect-engine.c:1300
DetectBufferTypeSetDescriptionByName
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc)
Definition: detect-engine.c:1183
MpmCtx_
Definition: util-mpm.h:88
flow.h
SCCalloc
#define SCCalloc(nm, sz)
Definition: util-mem.h:53
SCReturnInt
#define SCReturnInt(x)
Definition: util-debug.h:302
flow-var.h
app-layer-ssl.h
SigMatchAppendSMToList
void SigMatchAppendSMToList(Signature *s, SigMatch *new, int list)
Append a SigMatch to the list type.
Definition: detect-parse.c:349
SigTableElmt_::RegisterTests
void(* RegisterTests)(void)
Definition: detect.h:1237
app-layer.h