Go to the documentation of this file.
59 static void DetectTlsSerialRegisterTests(
void);
63 Flow *f,
const uint8_t flow_flags,
64 void *txv,
const int list_id);
67 static bool DetectTlsSerialValidateCallback(
const Signature *s,
68 const char **sigerror);
69 static int g_tls_cert_serial_buffer_id = 0;
96 "TLS certificate serial number");
99 DetectTlsSerialSetupCallback);
102 DetectTlsSerialValidateCallback);
130 const uint8_t flow_flags,
void *txv,
const int list_id)
150 static bool DetectTlsSerialValidateCallback(
const Signature *s,
151 const char **sigerror)
154 for ( ; sm != NULL; sm = sm->
next)
162 *sigerror =
"tls.cert_serial should not be used together "
163 "with nocase, since the rule is automatically "
164 "uppercased anyway which makes nocase redundant.";
177 *sigerror =
"No colon delimiters ':' detected in content after "
178 "tls.cert_serial. This rule will therefore never "
192 for ( ; sm != NULL; sm = sm->
next)
199 bool changed =
false;
#define DETECT_CONTENT_NOCASE
int DetectSignatureSetAppProto(Signature *s, AppProto alproto)
SSLv[2.0|3.[0|1|2|3]] state structure.
#define SIGMATCH_INFO_STICKY_BUFFER
void DetectTlsSerialRegister(void)
Registration function for keyword: tls.cert_serial.
SSLStateConnp server_connp
void DetectBufferTypeRegisterSetupCallback(const char *name, void(*SetupCallback)(const DetectEngineCtx *, Signature *))
int PrefilterGenericMpmRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistery *mpm_reg, int list_id)
main detection engine ctx
#define SIG_FLAG_TOCLIENT
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
InspectionBuffer * InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
int DetectBufferTypeGetByName(const char *name)
void DetectBufferTypeRegisterValidateCallback(const char *name, bool(*ValidateCallback)(const Signature *, const char **sigerror))
int DetectEngineInspectBufferGeneric(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, const 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.
void DetectAppLayerInspectEngineRegister2(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr2 Callback2, InspectionBufferGetDataPtr GetData)
register inspect engine at start up time
SignatureInitData * init_data
struct SigMatch_ ** smlists
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
void InspectionBufferApplyTransforms(InspectionBuffer *buffer, const DetectEngineTransforms *transforms)
SigTableElmt sigmatch_table[DETECT_TBLSIZE]
#define SCLogWarning(err_code,...)
Macro used to log WARNING messages.
void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id, InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len)
setup the buffer with our initial data
a single match condition for a signature
@ DETECT_AL_TLS_CERT_SERIAL
SpmGlobalThreadCtx * spm_global_thread_ctx
int DetectBufferSetActiveList(Signature *s, const int list)
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc)
void SpmDestroyCtx(SpmCtx *ctx)
SpmCtx * SpmInitCtx(const uint8_t *needle, uint16_t needle_len, int nocase, SpmGlobalThreadCtx *global_thread_ctx)
void(* RegisterTests)(void)