use libc::c_uchar;
#[cfg(feature = "ja4")]
use sha2::Sha256;
-use std::{cmp::min, os::raw::c_char};
+#[cfg(feature = "ja4")]
+use std::cmp::min;
+use std::os::raw::c_char;
use tls_parser::{TlsCipherSuiteID, TlsExtensionType, TlsVersion};
#[derive(Debug, PartialEq)]
}
#endif /* HAVE_JA4 */
+#ifdef HAVE_JA4
static int DetectJa4HashSetup(DetectEngineCtx *, Signature *, const char *);
static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx,
const DetectEngineTransforms *transforms, Flow *f, const uint8_t flow_flags, void *txv,
const int list_id);
static int g_ja4_hash_buffer_id = 0;
+#endif
/**
* \brief Registration function for keyword: ja4.hash
#endif /* HAVE_JA4 */
}
+#ifdef HAVE_JA4
/**
* \brief this function setup the ja4.hash modifier keyword used in the rule
*
}
return buffer;
}
+#endif
}
#endif
+#ifdef HAVE_JA3
static int DetectTlsJa3HashSetup(DetectEngineCtx *, Signature *, const char *);
static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx,
const DetectEngineTransforms *transforms,
static bool DetectTlsJa3HashValidateCallback(const Signature *s,
const char **sigerror);
static int g_tls_ja3_hash_buffer_id = 0;
+#endif
/**
* \brief Registration function for keyword: ja3_hash
#endif /* HAVE_JA3 */
}
+#ifdef HAVE_JA3
/**
* \brief this function setup the ja3.hash modifier keyword used in the rule
*
}
}
}
+#endif
}
#endif /* HAVE_JA3 */
+#ifdef HAVE_JA3
static int DetectTlsJa3StringSetup(DetectEngineCtx *, Signature *, const char *);
static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx,
const DetectEngineTransforms *transforms,
Flow *f, const uint8_t flow_flags,
void *txv, const int list_id);
static int g_tls_ja3_str_buffer_id = 0;
+#endif
/**
* \brief Registration function for keyword: ja3.string
#endif /* HAVE_JA3 */
}
+#ifdef HAVE_JA3
/**
* \brief this function setup the ja3.string modifier keyword used in the rule
*
return buffer;
}
+#endif
}
#endif /* HAVE_JA3 */
+#ifdef HAVE_JA3
static int DetectTlsJa3SHashSetup(DetectEngineCtx *, Signature *, const char *);
static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx,
const DetectEngineTransforms *transforms,
static bool DetectTlsJa3SHashValidateCallback(const Signature *s,
const char **sigerror);
static int g_tls_ja3s_hash_buffer_id = 0;
+#endif
/**
* \brief Registration function for keyword: ja3s.hash
#endif /* HAVE_JA3 */
}
+#ifdef HAVE_JA3
/**
* \brief this function setup the ja3s.hash modifier keyword used in the rule
*
}
}
}
+#endif
}
#endif /* HAVE_JA3 */
+#ifdef HAVE_JA3
static int DetectTlsJa3SStringSetup(DetectEngineCtx *, Signature *, const char *);
static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx,
const DetectEngineTransforms *transforms,
Flow *f, const uint8_t flow_flags,
void *txv, const int list_id);
static int g_tls_ja3s_str_buffer_id = 0;
+#endif
/**
* \brief Registration function for keyword: ja3s.string
#endif /* HAVE_JA3 */
}
+#ifdef HAVE_JA3
/**
* \brief this function setup the ja3s.string modifier keyword used in the rule
*
return buffer;
}
+#endif