From: Mats Klepsland Date: Tue, 14 May 2019 05:54:03 +0000 (+0200) Subject: detect-tls: remove confusing underscores from variables X-Git-Tag: suricata-5.0.0-rc1~496 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c04d7cdae8f5261d709dc4052c48cf3a371f375;p=thirdparty%2Fsuricata.git detect-tls: remove confusing underscores from variables Remove confusing underscore prefix from variables in GetData() for all tls keywords. --- diff --git a/src/detect-tls-cert-fingerprint.c b/src/detect-tls-cert-fingerprint.c index 6b803d375c..7b685de8c2 100644 --- a/src/detect-tls-cert-fingerprint.c +++ b/src/detect-tls-cert-fingerprint.c @@ -58,7 +58,7 @@ static int DetectTlsFingerprintSetup(DetectEngineCtx *, Signature *, const char static void DetectTlsFingerprintRegisterTests(void); static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx, const DetectEngineTransforms *transforms, - Flow *_f, const uint8_t _flow_flags, + Flow *f, const uint8_t flow_flags, void *txv, const int list_id); static void DetectTlsFingerprintSetupCallback(const DetectEngineCtx *de_ctx, Signature *s); @@ -124,12 +124,12 @@ static int DetectTlsFingerprintSetup(DetectEngineCtx *de_ctx, Signature *s, } static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx, - const DetectEngineTransforms *transforms, Flow *_f, - const uint8_t _flow_flags, void *txv, const int list_id) + const DetectEngineTransforms *transforms, Flow *f, + const uint8_t flow_flags, void *txv, const int list_id) { InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id); if (buffer->inspect == NULL) { - SSLState *ssl_state = (SSLState *)_f->alstate; + SSLState *ssl_state = (SSLState *)f->alstate; if (ssl_state->server_connp.cert0_fingerprint == NULL) { return NULL; diff --git a/src/detect-tls-cert-issuer.c b/src/detect-tls-cert-issuer.c index 8f3dd2d590..6aedcebed9 100644 --- a/src/detect-tls-cert-issuer.c +++ b/src/detect-tls-cert-issuer.c @@ -58,7 +58,7 @@ static int DetectTlsIssuerSetup(DetectEngineCtx *, Signature *, const char *); static void DetectTlsIssuerRegisterTests(void); static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx, const DetectEngineTransforms *transforms, - Flow *_f, const uint8_t _flow_flags, + Flow *f, const uint8_t flow_flags, void *txv, const int list_id); static int g_tls_cert_issuer_buffer_id = 0; @@ -111,12 +111,12 @@ static int DetectTlsIssuerSetup(DetectEngineCtx *de_ctx, Signature *s, const cha } static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx, - const DetectEngineTransforms *transforms, Flow *_f, - const uint8_t _flow_flags, void *txv, const int list_id) + const DetectEngineTransforms *transforms, Flow *f, + const uint8_t flow_flags, void *txv, const int list_id) { InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id); if (buffer->inspect == NULL) { - SSLState *ssl_state = (SSLState *)_f->alstate; + SSLState *ssl_state = (SSLState *)f->alstate; if (ssl_state->server_connp.cert0_issuerdn == NULL) { return NULL; diff --git a/src/detect-tls-cert-serial.c b/src/detect-tls-cert-serial.c index 624c40298d..4f34998aaf 100644 --- a/src/detect-tls-cert-serial.c +++ b/src/detect-tls-cert-serial.c @@ -58,7 +58,7 @@ static int DetectTlsSerialSetup(DetectEngineCtx *, Signature *, const char *); static void DetectTlsSerialRegisterTests(void); static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx, const DetectEngineTransforms *transforms, - Flow *_f, const uint8_t _flow_flags, + Flow *f, const uint8_t flow_flags, void *txv, const int list_id); static void DetectTlsSerialSetupCallback(const DetectEngineCtx *de_ctx, Signature *s); @@ -123,12 +123,12 @@ static int DetectTlsSerialSetup(DetectEngineCtx *de_ctx, Signature *s, const cha } static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx, - const DetectEngineTransforms *transforms, Flow *_f, - const uint8_t _flow_flags, void *txv, const int list_id) + const DetectEngineTransforms *transforms, Flow *f, + const uint8_t flow_flags, void *txv, const int list_id) { InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id); if (buffer->inspect == NULL) { - SSLState *ssl_state = (SSLState *)_f->alstate; + SSLState *ssl_state = (SSLState *)f->alstate; if (ssl_state->server_connp.cert0_serial == NULL) { return NULL; diff --git a/src/detect-tls-cert-subject.c b/src/detect-tls-cert-subject.c index 3c1c4c9772..ba30018696 100644 --- a/src/detect-tls-cert-subject.c +++ b/src/detect-tls-cert-subject.c @@ -58,7 +58,7 @@ static int DetectTlsSubjectSetup(DetectEngineCtx *, Signature *, const char *); static void DetectTlsSubjectRegisterTests(void); static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx, const DetectEngineTransforms *transforms, - Flow *_f, const uint8_t _flow_flags, + Flow *f, const uint8_t flow_flags, void *txv, const int list_id); static int g_tls_cert_subject_buffer_id = 0; @@ -110,12 +110,12 @@ static int DetectTlsSubjectSetup(DetectEngineCtx *de_ctx, Signature *s, const ch } static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx, - const DetectEngineTransforms *transforms, Flow *_f, - const uint8_t _flow_flags, void *txv, const int list_id) + const DetectEngineTransforms *transforms, Flow *f, + const uint8_t flow_flags, void *txv, const int list_id) { InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id); if (buffer->inspect == NULL) { - SSLState *ssl_state = (SSLState *)_f->alstate; + SSLState *ssl_state = (SSLState *)f->alstate; if (ssl_state->server_connp.cert0_subject == NULL) { return NULL; diff --git a/src/detect-tls-ja3-hash.c b/src/detect-tls-ja3-hash.c index ef1453c823..5ecde459a9 100644 --- a/src/detect-tls-ja3-hash.c +++ b/src/detect-tls-ja3-hash.c @@ -62,7 +62,7 @@ static int DetectTlsJa3HashSetup(DetectEngineCtx *, Signature *, const char *); static void DetectTlsJa3HashRegisterTests(void); static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx, const DetectEngineTransforms *transforms, - Flow *_f, const uint8_t _flow_flags, + Flow *f, const uint8_t flow_flags, void *txv, const int list_id); static void DetectTlsJa3HashSetupCallback(const DetectEngineCtx *de_ctx, Signature *s); @@ -129,12 +129,12 @@ static int DetectTlsJa3HashSetup(DetectEngineCtx *de_ctx, Signature *s, const ch } static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx, - const DetectEngineTransforms *transforms, Flow *_f, - const uint8_t _flow_flags, void *txv, const int list_id) + const DetectEngineTransforms *transforms, Flow *f, + const uint8_t flow_flags, void *txv, const int list_id) { InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id); if (buffer->inspect == NULL) { - SSLState *ssl_state = (SSLState *)_f->alstate; + SSLState *ssl_state = (SSLState *)f->alstate; if (ssl_state->ja3_hash == NULL) { return NULL; diff --git a/src/detect-tls-ja3-string.c b/src/detect-tls-ja3-string.c index d58359ecbc..5fd7cd5e47 100644 --- a/src/detect-tls-ja3-string.c +++ b/src/detect-tls-ja3-string.c @@ -62,7 +62,7 @@ static int DetectTlsJa3StringSetup(DetectEngineCtx *, Signature *, const char *) static void DetectTlsJa3StringRegisterTests(void); static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx, const DetectEngineTransforms *transforms, - Flow *_f, const uint8_t _flow_flags, + Flow *f, const uint8_t flow_flags, void *txv, const int list_id); static int g_tls_ja3_str_buffer_id = 0; @@ -119,12 +119,12 @@ static int DetectTlsJa3StringSetup(DetectEngineCtx *de_ctx, Signature *s, const } static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx, - const DetectEngineTransforms *transforms, Flow *_f, - const uint8_t _flow_flags, void *txv, const int list_id) + const DetectEngineTransforms *transforms, Flow *f, + const uint8_t flow_flags, void *txv, const int list_id) { InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id); if (buffer->inspect == NULL) { - SSLState *ssl_state = (SSLState *)_f->alstate; + SSLState *ssl_state = (SSLState *)f->alstate; if (ssl_state->ja3_str == NULL || ssl_state->ja3_str->data == NULL) { diff --git a/src/detect-tls-sni.c b/src/detect-tls-sni.c index d333c47fab..969b9d78ab 100644 --- a/src/detect-tls-sni.c +++ b/src/detect-tls-sni.c @@ -58,7 +58,7 @@ static int DetectTlsSniSetup(DetectEngineCtx *, Signature *, const char *); static void DetectTlsSniRegisterTests(void); static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx, const DetectEngineTransforms *transforms, - Flow *_f, const uint8_t _flow_flags, + Flow *f, const uint8_t flow_flags, void *txv, const int list_id); static int g_tls_sni_buffer_id = 0; @@ -109,12 +109,12 @@ static int DetectTlsSniSetup(DetectEngineCtx *de_ctx, Signature *s, const char * } static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx, - const DetectEngineTransforms *transforms, Flow *_f, - const uint8_t _flow_flags, void *txv, const int list_id) + const DetectEngineTransforms *transforms, Flow *f, + const uint8_t flow_flags, void *txv, const int list_id) { InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id); if (buffer->inspect == NULL) { - SSLState *ssl_state = (SSLState *)_f->alstate; + SSLState *ssl_state = (SSLState *)f->alstate; if (ssl_state->client_connp.sni == NULL) { return NULL;