Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1391,8 +1391,7 @@ jobs:

macos-latest:
name: MacOS Latest
# use 10.15 for now. Build fails on macos-11 (aka macos-latest)
runs-on: macos-10.15
runs-on: macos-latest
needs: [prepare-deps]
steps:
# Cache Rust stuff.
Expand All @@ -1409,6 +1408,7 @@ jobs:
hiredis \
jansson \
jq \
libiconv \
libmagic \
libnet \
libtool \
Expand All @@ -1434,9 +1434,10 @@ jobs:
- run: tar xvf prep/libhtp.tar.gz
- run: tar xvf prep/suricata-update.tar.gz
- run: ./autogen.sh
- run: CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-unittests
- run: CFLAGS="${DEFAULT_CFLAGS}" CPPFLAGS="-I/usr/local/opt/libiconv/include" CXXFLAGS="-I/usr/local/opt/libiconv/include" LDFLAGS="-L/usr/local/opt/libiconv/lib" ./configure --enable-unittests
- run: make -j2
- run: make check
# somehow it gets included by some C++ stdlib header (case unsensitive)
- run: rm libhtp/VERSION && make check
- run: tar xf prep/suricata-verify.tar.gz
- name: Running suricata-verify
run: python3 ./suricata-verify/run.py
Expand Down
2 changes: 1 addition & 1 deletion doc/devguide/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
#
# name {repo} {branch|tag}
libhtp https://github.com/OISF/libhtp 0.5.44
suricata-update https://github.com/OISF/suricata-update 1.2.7
suricata-update https://github.com/OISF/suricata-update 1.2.8
6 changes: 5 additions & 1 deletion rust/Cargo.toml.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ ntp-parser = "0.4"
ipsec-parser = "0.5"
snmp-parser = "0.6"
tls-parser = "0.9"
x509-parser = "0.6.5"
# required by x509 to keep MSRV support
chrono = "=0.4.19"
thiserror = "=1.0.39"
data-encoding = "=2.3.3"
x509-parser = "0.8.2"
libc = "0.2.67"

[dev-dependencies]
Expand Down
12 changes: 2 additions & 10 deletions rust/src/x509/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ pub enum X509DecodeError {
InvalidCert,
/// Some length does not match, or certificate is incomplete
InvalidLength,
InvalidVersion,
InvalidSerial,
InvalidAlgorithmIdentifier,
InvalidX509Name,
InvalidDate,
InvalidExtensions,
/// DER structure is invalid
InvalidDER,
}
Expand Down Expand Up @@ -112,8 +108,8 @@ pub unsafe extern "C" fn rs_x509_get_validity(
return -1;
}
let x509 = &*ptr;
let n_b = x509.0.tbs_certificate.validity.not_before.to_timespec().sec;
let n_a = x509.0.tbs_certificate.validity.not_after.to_timespec().sec;
let n_b = x509.0.tbs_certificate.validity.not_before.timestamp();
let n_a = x509.0.tbs_certificate.validity.not_after.timestamp();
*not_before = n_b;
*not_after = n_a;
0
Expand All @@ -136,12 +132,8 @@ fn x509_parse_error_to_errcode(e: &nom::Err<X509Error>) -> X509DecodeError {
match e {
nom::Err::Incomplete(_) => X509DecodeError::InvalidLength,
nom::Err::Error(e) | nom::Err::Failure(e) => match e {
X509Error::InvalidVersion => X509DecodeError::InvalidVersion,
X509Error::InvalidSerial => X509DecodeError::InvalidSerial,
X509Error::InvalidAlgorithmIdentifier => X509DecodeError::InvalidAlgorithmIdentifier,
X509Error::InvalidX509Name => X509DecodeError::InvalidX509Name,
X509Error::InvalidDate => X509DecodeError::InvalidDate,
X509Error::InvalidExtensions => X509DecodeError::InvalidExtensions,
X509Error::Der(_) => X509DecodeError::InvalidDER,
_ => X509DecodeError::InvalidCert,
},
Expand Down
2 changes: 1 addition & 1 deletion src/output-json-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ JsonBuilder *JsonBuildFileInfoRecord(const Packet *p, const File *ff, const bool
break;
case ALPROTO_HTTP2:
jb_get_mark(js, &mark);
jb_open_object(js, "http2");
jb_open_object(js, "http");
if (EveHTTP2AddMetadata(p->flow, ff->txid, js)) {
jb_close(js);
} else {
Expand Down
7 changes: 7 additions & 0 deletions src/util-daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,14 @@ void Daemonize (void)
through conf file */

/* Creates a new process */
#if defined(OS_DARWIN) && defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
pid = fork();
#if defined(OS_DARWIN) && defined(__clang__)
#pragma clang diagnostic pop
#endif

if (pid < 0) {
/* Fork error */
Expand Down