From 3d9fc3bf1d606e9d0e850430f4ed6414c9135cae Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Mon, 17 Apr 2023 15:23:14 -0600 Subject: [PATCH] rust: update snmp-parser to 0.9.0 Updating snmp-parser required directly depending on the asn1-rs crate for the Oid type, as snmp-parser does not re-export this type anymore. Ticket: #5992 --- rust/Cargo.lock.in | 7 ++++--- rust/Cargo.toml.in | 3 ++- rust/src/snmp/snmp.rs | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/rust/Cargo.lock.in b/rust/Cargo.lock.in index f6f714942d..3951afa6ba 100644 --- a/rust/Cargo.lock.in +++ b/rust/Cargo.lock.in @@ -955,11 +955,11 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] name = "snmp-parser" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7f0b0216476fe1afa2dbcabea4e2a8e2ed3c1389d6208f37f242aa07a8407a" +checksum = "773a26ad6742636f4259e7cc32262efb31feabd56bc34f0b2f28de9801aa24b3" dependencies = [ - "der-parser 6.0.1", + "asn1-rs", "nom 7.1.3", "rusticata-macros", "thiserror", @@ -983,6 +983,7 @@ version = "7.0.0-rc2-dev" dependencies = [ "aes", "aes-gcm", + "asn1-rs", "base64", "bendy", "bitflags", diff --git a/rust/Cargo.toml.in b/rust/Cargo.toml.in index 2e2457ab88..3eff29cb69 100644 --- a/rust/Cargo.toml.in +++ b/rust/Cargo.toml.in @@ -45,7 +45,7 @@ der-parser = "~6.0" kerberos-parser = "~0.7.1" ntp-parser = "~0.6.0" ipsec-parser = "~0.7.0" -snmp-parser = "~0.8.0" +snmp-parser = "~0.9.0" tls-parser = "~0.11.0" x509-parser = "~0.14.0" libc = "~0.2.82" @@ -58,6 +58,7 @@ lazy_static = "~1.4.0" base64 = "~0.13.0" time = "=0.3.13" bendy = { version = "~0.3.3", default-features = false } +asn1-rs = { version = "~0.5.2" } suricata-derive = { path = "./derive" } diff --git a/rust/src/snmp/snmp.rs b/rust/src/snmp/snmp.rs index 037efe9e3d..1ed9c89b8f 100644 --- a/rust/src/snmp/snmp.rs +++ b/rust/src/snmp/snmp.rs @@ -23,9 +23,9 @@ use crate::applayer::{self, *}; use std; use std::ffi::CString; +use asn1_rs::Oid; use der_parser::ber::BerObjectContent; use der_parser::der::parse_der_sequence; -use der_parser::oid::Oid; use nom7::{Err, IResult}; use nom7::error::{ErrorKind, make_error};