eve/tls: don't construct const from other const

Some compiler/platform combinations don't like creating one const from
another as it can't guarantee the other is defined, resulting in the
following compile error:

output-json-tls.c:102:5: error: initializer element is not constant
     BASIC_FIELDS |
     ^~~~~~~~~~~~

Fixes commit 377989df6c
pull/12032/head
Jason Ish 2 years ago committed by Victor Julien
parent 175e690222
commit a739d7623b

@ -91,27 +91,27 @@ TlsFields tls_fields[] = {
};
// clang-format off
static const uint64_t BASIC_FIELDS = \
LOG_TLS_FIELD_SUBJECT |
LOG_TLS_FIELD_ISSUER |
LOG_TLS_FIELD_SUBJECTALTNAME;
#define BASIC_FIELDS \
(LOG_TLS_FIELD_SUBJECT | \
LOG_TLS_FIELD_ISSUER | \
LOG_TLS_FIELD_SUBJECTALTNAME)
// clang-format on
// clang-format off
static const uint64_t EXTENDED_FIELDS = \
BASIC_FIELDS |
LOG_TLS_FIELD_VERSION |
LOG_TLS_FIELD_SERIAL |
LOG_TLS_FIELD_FINGERPRINT |
LOG_TLS_FIELD_NOTBEFORE |
LOG_TLS_FIELD_NOTAFTER |
LOG_TLS_FIELD_JA3 |
LOG_TLS_FIELD_JA3S |
LOG_TLS_FIELD_JA4 |
LOG_TLS_FIELD_CLIENT |
LOG_TLS_FIELD_CLIENT_ALPNS |
LOG_TLS_FIELD_SERVER_ALPNS |
LOG_TLS_FIELD_SNI;
#define EXTENDED_FIELDS \
(BASIC_FIELDS | \
LOG_TLS_FIELD_VERSION | \
LOG_TLS_FIELD_SERIAL | \
LOG_TLS_FIELD_FINGERPRINT | \
LOG_TLS_FIELD_NOTBEFORE | \
LOG_TLS_FIELD_NOTAFTER | \
LOG_TLS_FIELD_JA3 | \
LOG_TLS_FIELD_JA3S | \
LOG_TLS_FIELD_JA4 | \
LOG_TLS_FIELD_CLIENT | \
LOG_TLS_FIELD_CLIENT_ALPNS | \
LOG_TLS_FIELD_SERVER_ALPNS | \
LOG_TLS_FIELD_SNI)
// clang-format on
typedef struct OutputTlsCtx_ {

Loading…
Cancel
Save