diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2022-12-09 21:54:03 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-12-09 21:54:03 +0000 |
commit | d565bc397e69f96c8d9e8b570914f1405ad55b6e (patch) | |
tree | 6b36fa5e85c256383b682b1872e68da5016bc5d1 | |
parent | eaee14925b51f4bd8a7ba32ce3176a6f1df73026 (diff) | |
parent | 7063165b4f00a91fb575bbd23e3185af586817ae (diff) | |
download | der-parser-d565bc397e69f96c8d9e8b570914f1405ad55b6e.tar.gz |
Merge "Update der-parser to 6.0.1" am: 7063165b4f
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/der-parser/+/2337025
Change-Id: Idc967d9a1e8a17e67a5ff896ac477fcf3710e17a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | .cargo_vcs_info.json | 7 | ||||
-rw-r--r-- | Android.bp | 3 | ||||
-rw-r--r-- | CHANGELOG.md | 6 | ||||
-rw-r--r-- | Cargo.toml | 4 | ||||
-rw-r--r-- | Cargo.toml.orig | 4 | ||||
-rw-r--r-- | METADATA | 11 | ||||
-rw-r--r-- | OWNERS | 2 | ||||
-rw-r--r-- | src/ber/multi.rs | 2 | ||||
-rw-r--r-- | src/ber/parser.rs | 14 | ||||
-rw-r--r-- | src/der/multi.rs | 2 |
10 files changed, 32 insertions, 23 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 4eaee56..df3c872 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,6 @@ { "git": { - "sha1": "7b9b5b84387d7c4707b1abc7a13faba515b7c08e" - } -} + "sha1": "73273e8d5d2f15b3ee825d3d0b0ba0c1990ac60f" + }, + "path_in_vcs": "" +}
\ No newline at end of file @@ -16,6 +16,7 @@ package { // default license using the 'licenses: [...]' property on targets as needed. // // For unused files, consider creating a 'fileGroup' with "//visibility:private" + // to attach the license to, and including a comment whether the files may be // used in the current project. // @@ -42,7 +43,7 @@ rust_library { host_supported: true, crate_name: "der_parser", cargo_env_compat: true, - cargo_pkg_version: "6.0.0", + cargo_pkg_version: "6.0.1", srcs: ["src/lib.rs"], edition: "2018", features: [ diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fa3705..cba3b02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ ### Thanks +## 6.0.1 + +### Changed/Fixed + +- Report number of missing bytes when having a complete header and incomplete data + ## 6.0.0 This release has several major changes: @@ -12,7 +12,7 @@ [package] edition = "2018" name = "der-parser" -version = "6.0.0" +version = "6.0.1" authors = ["Pierre Chifflier <chifflier@wzdftpd.net>"] include = ["LICENSE-*", "CHANGELOG.md", "README.md", "UPGRADING.md", ".gitignore", "Cargo.toml", "bench/*.rs", "src/*.rs", "src/ber/*.rs", "src/der/*.rs", "tests/*.rs", "der-oid-macro/Cargo.toml", "der-oid-macro/src/*.rs"] description = "Parser/encoder for ASN.1 BER/DER data" @@ -52,7 +52,7 @@ version = "4.0" version = "0.3" [dev-dependencies.pretty_assertions] -version = "0.7" +version = "1.0" [dev-dependencies.test-case] version = "1.0" diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 69f5242..bb26655 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -5,7 +5,7 @@ keywords = ["BER","DER","ASN1","parser","nom"] homepage = "https://github.com/rusticata/der-parser" repository = "https://github.com/rusticata/der-parser.git" name = "der-parser" -version = "6.0.0" +version = "6.0.1" authors = ["Pierre Chifflier <chifflier@wzdftpd.net>"] categories = ["parser-implementations"] readme = "README.md" @@ -50,5 +50,5 @@ std = [] [dev-dependencies] hex-literal = "0.3" -pretty_assertions = "0.7" +pretty_assertions = "1.0" test-case = "1.0" @@ -7,13 +7,14 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/der-parser/der-parser-6.0.0.crate" + value: "https://static.crates.io/crates/der-parser/der-parser-6.0.1.crate" } - version: "6.0.0" + version: "6.0.1" + # Dual-licensed, using the least restrictive per go/thirdpartylicenses#same. license_type: NOTICE last_upgrade_date { - year: 2021 - month: 9 - day: 27 + year: 2022 + month: 12 + day: 9 } } @@ -1 +1 @@ -include platform/prebuilts/rust:/OWNERS +include platform/prebuilts/rust:master:/OWNERS diff --git a/src/ber/multi.rs b/src/ber/multi.rs index 5287d47..dc030d2 100644 --- a/src/ber/multi.rs +++ b/src/ber/multi.rs @@ -1,6 +1,6 @@ use crate::ber::*; use crate::error::*; -use nom::bytes::complete::take; +use nom::bytes::streaming::take; use nom::combinator::{all_consuming, complete, cut, map}; use nom::error::ParseError; use nom::multi::many0; diff --git a/src/ber/parser.rs b/src/ber/parser.rs index 81ccef8..24cbfc7 100644 --- a/src/ber/parser.rs +++ b/src/ber/parser.rs @@ -280,7 +280,7 @@ fn ber_read_content_utf8string(i: &[u8], len: usize) -> BerResult<BerObjectConte let (i, bytes) = take(len)(i)?; let s = core::str::from_utf8(bytes) .map_err(|_| Err::Error(BerError::StringInvalidCharset)) - .map(|s| BerObjectContent::UTF8String(s))?; + .map(BerObjectContent::UTF8String)?; Ok((i, s)) } @@ -345,7 +345,7 @@ fn ber_read_content_numericstring<'a>(i: &'a [u8], len: usize) -> BerResult<BerO } let s = core::str::from_utf8(bytes) .map_err(|_| Err::Error(BerError::StringInvalidCharset)) - .map(|s| BerObjectContent::NumericString(s))?; + .map(BerObjectContent::NumericString)?; Ok((i, s)) } @@ -361,7 +361,7 @@ fn ber_read_content_visiblestring<'a>(i: &'a [u8], len: usize) -> BerResult<BerO } let s = core::str::from_utf8(bytes) .map_err(|_| Err::Error(BerError::StringInvalidCharset)) - .map(|s| BerObjectContent::VisibleString(s))?; + .map(BerObjectContent::VisibleString)?; Ok((i, s)) } @@ -395,7 +395,7 @@ fn ber_read_content_printablestring<'a>( } let s = core::str::from_utf8(bytes) .map_err(|_| Err::Error(BerError::StringInvalidCharset)) - .map(|s| BerObjectContent::PrintableString(s))?; + .map(BerObjectContent::PrintableString)?; Ok((i, s)) } @@ -416,7 +416,7 @@ fn ber_read_content_ia5string<'a>(i: &'a [u8], len: usize) -> BerResult<BerObjec } let s = core::str::from_utf8(bytes) .map_err(|_| Err::Error(BerError::StringInvalidCharset)) - .map(|s| BerObjectContent::IA5String(s))?; + .map(BerObjectContent::IA5String)?; Ok((i, s)) } @@ -432,7 +432,7 @@ fn ber_read_content_utctime<'a>(i: &'a [u8], len: usize) -> BerResult<BerObjectC } let s = core::str::from_utf8(bytes) .map_err(|_| Err::Error(BerError::StringInvalidCharset)) - .map(|s| BerObjectContent::UTCTime(s))?; + .map(BerObjectContent::UTCTime)?; Ok((i, s)) } @@ -451,7 +451,7 @@ fn ber_read_content_generalizedtime<'a>( } let s = core::str::from_utf8(bytes) .map_err(|_| Err::Error(BerError::StringInvalidCharset)) - .map(|s| BerObjectContent::GeneralizedTime(s))?; + .map(BerObjectContent::GeneralizedTime)?; Ok((i, s)) } diff --git a/src/der/multi.rs b/src/der/multi.rs index 6c8931e..f4f22fa 100644 --- a/src/der/multi.rs +++ b/src/der/multi.rs @@ -1,7 +1,7 @@ use crate::ber::BerSize; use crate::der::*; use crate::error::*; -use nom::bytes::complete::take; +use nom::bytes::streaming::take; use nom::combinator::{all_consuming, complete, cut, map}; use nom::error::ParseError; use nom::multi::many0; |