From 9835e2ae736235810b4ea1c162ca5e65c547e770 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 04:49:50 +0200 Subject: Merging upstream version 1.71.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/pem-rfc7468/.cargo-checksum.json | 2 +- vendor/pem-rfc7468/CHANGELOG.md | 8 ++++++++ vendor/pem-rfc7468/Cargo.toml | 5 ++--- vendor/pem-rfc7468/README.md | 25 ++++++++++++------------- vendor/pem-rfc7468/src/decoder.rs | 3 --- vendor/pem-rfc7468/src/encoder.rs | 2 -- vendor/pem-rfc7468/src/error.rs | 1 - vendor/pem-rfc7468/src/lib.rs | 8 +++++--- 8 files changed, 28 insertions(+), 26 deletions(-) (limited to 'vendor/pem-rfc7468') diff --git a/vendor/pem-rfc7468/.cargo-checksum.json b/vendor/pem-rfc7468/.cargo-checksum.json index 463768c59..de2960bfb 100644 --- a/vendor/pem-rfc7468/.cargo-checksum.json +++ b/vendor/pem-rfc7468/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CHANGELOG.md":"3b6575f8a600ff23eca1b01e1191bdf0b72d0de70ad51f8c873e06f9ac352f06","Cargo.toml":"3783b217d97d96933e671bf8b064a50b16e56a913af96c9ce333d143c5300e07","LICENSE-APACHE":"a9040321c3712d8fd0b09cf52b17445de04a23a10165049ae187cd39e5c86be5","LICENSE-MIT":"90c503b61dee04e1449c323ec34c229dfb68d7adcb96c7e140ee55f70fce2d8e","README.md":"3856b0b95dabe0839fb41e19fd09d4d072b19648f5abd7defad80900d78d0753","src/decoder.rs":"3afc132f0fe52884b0d9384344cc947eae0827956504b6a0ca36f944c5ea2a15","src/encoder.rs":"911edb1c12ef66f9833adb8629b5c9acb8a7795ca08a9c40f5c3d776a5862211","src/error.rs":"be438cbdc991729e253becc873c174babbe3880f589581356911bcbad11c405b","src/grammar.rs":"b2078760aa850738117438e38533cbc17dd96fdc5738fd9cdce3a2c027ebf783","src/lib.rs":"78da3b06fb7f8d6264a615f83754c548fb2220a450339a070818f104863edff5","tests/decode.rs":"fda063622f13dcf308f3303b796e90bb6579dbbb01a3c64157ce94418a4648da","tests/encode.rs":"7f6479363a92eda9d8ac3fdf427aa5920d6701f7706f2a76c6cb9a36c8087ee8","tests/examples/chosen_header.pem":"76da209faa6a64bf9dfac228a1a3ccac63544a94ef9a16a6c295a35c995c4016","tests/examples/ed25519_id.pem":"01a9f4e326cdc04e0580efc23e8fcaa2c0872b48fede39f7acb7bc0bf99ff129","tests/examples/pkcs1.der":"f94b60300e4877e863b2bea8d5c366a90432794454c05e0ec098ddbf96263614","tests/examples/pkcs1.pem":"026c0bc90e1d06dc828a90dc4fcfb29d5b4cd0eeb93123047035804092569086","tests/examples/pkcs1_with_preceeding_junk.pem":"4502747df2e3816e941989d5d63b6d3dadea50f0d38035992edcc6776e242605","tests/examples/pkcs8-enc.der":"72ea607c5f0e560f68ee914dca8a5a74bfa22a667333656864f7938960acd302","tests/examples/pkcs8-enc.pem":"0c8bd6713af3f28392f684c5ba8b1bd842d8b483d00c136cb1fb24976aab447a","tests/examples/pkcs8.der":"c1c3b09c4d18e096209edf25bc8dfc2f11dc29896085e49e5f4e487fbd97dbb6","tests/examples/pkcs8.pem":"8e39c38052cd63ab3870831a9f6cab76645426ca21ef77e24e2ead445aa4df16","tests/examples/ssh_rsa_pem_password.pem":"e1e2e46d0100cbfc13205c1c8a667d4139ea74d4e664cff9228175ad0e9ded52"},"package":"24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac"} \ No newline at end of file +{"files":{"CHANGELOG.md":"c6ad0693c5a6cf17d0e251451b5597ee33ea6e08a0635de8927cda35239ba982","Cargo.toml":"88c9f826dd390af0f176cd074ea3d27be8a63e6b5671f77db699daa7df3b121e","LICENSE-APACHE":"a9040321c3712d8fd0b09cf52b17445de04a23a10165049ae187cd39e5c86be5","LICENSE-MIT":"90c503b61dee04e1449c323ec34c229dfb68d7adcb96c7e140ee55f70fce2d8e","README.md":"4c83d87cb45d8adc72c0cddcf445389e1d1be72b95c27d71dfeb1f937ad2abfc","src/decoder.rs":"0e58986dd9dfb4bd948668efa5fdd3379908c5316e72165db58d1b7f8b87d8a6","src/encoder.rs":"477dc159381c889e5b4523ec7bc51b474965d890eeaf5917e007ebe6e9fd25fd","src/error.rs":"77031fac7c4b4762305e80b044a287dc94d5d93e8e1f5efb0b06bb2794a6e64d","src/grammar.rs":"b2078760aa850738117438e38533cbc17dd96fdc5738fd9cdce3a2c027ebf783","src/lib.rs":"a390b39b5166b526db31a10cae08643e735ba0734f7e92c102608881b7c173b8","tests/decode.rs":"fda063622f13dcf308f3303b796e90bb6579dbbb01a3c64157ce94418a4648da","tests/encode.rs":"7f6479363a92eda9d8ac3fdf427aa5920d6701f7706f2a76c6cb9a36c8087ee8","tests/examples/chosen_header.pem":"76da209faa6a64bf9dfac228a1a3ccac63544a94ef9a16a6c295a35c995c4016","tests/examples/ed25519_id.pem":"01a9f4e326cdc04e0580efc23e8fcaa2c0872b48fede39f7acb7bc0bf99ff129","tests/examples/pkcs1.der":"f94b60300e4877e863b2bea8d5c366a90432794454c05e0ec098ddbf96263614","tests/examples/pkcs1.pem":"026c0bc90e1d06dc828a90dc4fcfb29d5b4cd0eeb93123047035804092569086","tests/examples/pkcs1_with_preceeding_junk.pem":"4502747df2e3816e941989d5d63b6d3dadea50f0d38035992edcc6776e242605","tests/examples/pkcs8-enc.der":"72ea607c5f0e560f68ee914dca8a5a74bfa22a667333656864f7938960acd302","tests/examples/pkcs8-enc.pem":"0c8bd6713af3f28392f684c5ba8b1bd842d8b483d00c136cb1fb24976aab447a","tests/examples/pkcs8.der":"c1c3b09c4d18e096209edf25bc8dfc2f11dc29896085e49e5f4e487fbd97dbb6","tests/examples/pkcs8.pem":"8e39c38052cd63ab3870831a9f6cab76645426ca21ef77e24e2ead445aa4df16","tests/examples/ssh_rsa_pem_password.pem":"e1e2e46d0100cbfc13205c1c8a667d4139ea74d4e664cff9228175ad0e9ded52"},"package":"88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412"} \ No newline at end of file diff --git a/vendor/pem-rfc7468/CHANGELOG.md b/vendor/pem-rfc7468/CHANGELOG.md index 77bfa7e24..e25bb2663 100644 --- a/vendor/pem-rfc7468/CHANGELOG.md +++ b/vendor/pem-rfc7468/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.7.0 (2023-02-26) +### Changed +- MSRV 1.60 ([#802]) +- Lint improvements ([#824]) + +[#802]: https://github.com/RustCrypto/formats/pull/802 +[#824]: https://github.com/RustCrypto/formats/pull/824 + ## 0.6.0 (2022-04-26) ### Added - `encapsulated_len_wrapped` ([#619]) diff --git a/vendor/pem-rfc7468/Cargo.toml b/vendor/pem-rfc7468/Cargo.toml index 2048a5d36..15c317930 100644 --- a/vendor/pem-rfc7468/Cargo.toml +++ b/vendor/pem-rfc7468/Cargo.toml @@ -11,9 +11,9 @@ [package] edition = "2021" -rust-version = "1.56" +rust-version = "1.60" name = "pem-rfc7468" -version = "0.6.0" +version = "0.7.0" authors = ["RustCrypto Developers"] description = """ PEM Encoding (RFC 7468) for PKIX, PKCS, and CMS Structures, implementing a @@ -39,7 +39,6 @@ categories = [ ] license = "Apache-2.0 OR MIT" repository = "https://github.com/RustCrypto/formats/tree/master/pem-rfc7468" -resolver = "2" [package.metadata.docs.rs] all-features = true diff --git a/vendor/pem-rfc7468/README.md b/vendor/pem-rfc7468/README.md index c2f312670..4a085a2ea 100644 --- a/vendor/pem-rfc7468/README.md +++ b/vendor/pem-rfc7468/README.md @@ -31,7 +31,7 @@ MC4CAQAwBQYDK2VwBCIEIBftnHPp22SewYmmEoMcX8VwI4IHwaqd+9LFPj/15eqF ``` However, all of these formats actually implement a text-based encoding that is -similar to, but *not* identical with, the legacy PEM encoding as described in +similar but *not* identical to the legacy PEM encoding as described in [RFC 1421]. For this reason, [RFC 7468] was created to describe a stricter form of @@ -39,19 +39,18 @@ For this reason, [RFC 7468] was created to describe a stricter form of de facto rules that most implementations operate by, and makes recommendations to promote interoperability. -This crate attempts to implement a strict interpretation of the [RFC 7468] -rules, implementing all of the MUSTs and SHOULDs while avoiding the MAYs, -and targeting the "ABNF (Strict)" subset of the grammar as described in +This crate provides a strict interpretation of the [RFC 7468] rules, +implementing MUSTs and SHOULDs while avoiding the MAYs, targeting the +"ABNF (Strict)" subset of the grammar as described in [RFC 7468 Section 3 Figure 3 (p6)][RFC 7468 p6]. ## Implementation notes -- Core PEM implementation is `no_std`-friendly and requires no heap allocations. -- Avoids use of copies and temporary buffers. +- `no_std`-friendly core implementation which requires no heap allocations + and avoids copies and temporary buffers. +- Optional `alloc`-dependent convenience features and buffered decoder/encoder. - Uses the [`base64ct`] crate to decode/encode Base64 in constant-time. - PEM parser avoids branching on potentially secret data as much as possible. - In the happy path, only 1-byte of secret data is potentially - branched upon. The paper [Util::Lookup: Exploiting key decoding in cryptographic libraries][Util::Lookup] demonstrates how the leakage from non-constant-time PEM parsers can be used @@ -59,7 +58,7 @@ to practically extract RSA private keys from SGX enclaves. ## Minimum Supported Rust Version -This crate requires **Rust 1.56** at a minimum. +This crate requires **Rust 1.60** at a minimum. We may change the MSRV in the future, but it will be accompanied by a minor version bump. @@ -68,8 +67,8 @@ version bump. Licensed under either of: - * [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) - * [MIT license](http://opensource.org/licenses/MIT) +- [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) +- [MIT license](http://opensource.org/licenses/MIT) at your option. @@ -81,14 +80,14 @@ dual licensed as above, without any additional terms or conditions. [//]: # (badges) -[crate-image]: https://img.shields.io/crates/v/pem-rfc7468.svg +[crate-image]: https://buildstats.info/crate/pem-rfc7468 [crate-link]: https://crates.io/crates/pem-rfc7468 [docs-image]: https://docs.rs/pem-rfc7468/badge.svg [docs-link]: https://docs.rs/pem-rfc7468/ [build-image]: https://github.com/RustCrypto/formats/actions/workflows/pem-rfc7468.yml/badge.svg [build-link]: https://github.com/RustCrypto/formats/actions/workflows/pem-rfc7468.yml [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.60+-blue.svg [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/300570-formats diff --git a/vendor/pem-rfc7468/src/decoder.rs b/vendor/pem-rfc7468/src/decoder.rs index 8b8286a97..16e97fb56 100644 --- a/vendor/pem-rfc7468/src/decoder.rs +++ b/vendor/pem-rfc7468/src/decoder.rs @@ -45,7 +45,6 @@ pub fn decode<'i, 'o>(pem: &'i [u8], buf: &'o mut [u8]) -> Result<(&'i str, &'o /// Decode a PEM document according to RFC 7468's "Strict" grammar, returning /// the result as a [`Vec`] upon success. #[cfg(feature = "alloc")] -#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] pub fn decode_vec(pem: &[u8]) -> Result<(&str, Vec)> { let mut decoder = Decoder::new(pem).map_err(|e| check_for_headers(pem, e))?; let type_label = decoder.type_label(); @@ -107,7 +106,6 @@ impl<'i> Decoder<'i> { /// Decode all of the remaining data in the input buffer into `buf`. #[cfg(feature = "alloc")] - #[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] pub fn decode_to_end<'o>(&mut self, buf: &'o mut Vec) -> Result<&'o [u8]> { Ok(self.base64.decode_to_end(buf)?) } @@ -130,7 +128,6 @@ impl<'i> From> for Base64Decoder<'i> { } #[cfg(feature = "std")] -#[cfg_attr(docsrs, doc(cfg(feature = "std")))] impl<'i> io::Read for Decoder<'i> { fn read(&mut self, buf: &mut [u8]) -> io::Result { self.base64.read(buf) diff --git a/vendor/pem-rfc7468/src/encoder.rs b/vendor/pem-rfc7468/src/encoder.rs index 016e224c6..c48df1f62 100644 --- a/vendor/pem-rfc7468/src/encoder.rs +++ b/vendor/pem-rfc7468/src/encoder.rs @@ -119,7 +119,6 @@ pub fn encode<'o>( /// Encode a PEM document according to RFC 7468's "Strict" grammar, returning /// the result as a [`String`]. #[cfg(feature = "alloc")] -#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] pub fn encode_string(label: &str, line_ending: LineEnding, input: &[u8]) -> Result { let expected_len = encoded_len(label, line_ending, input)?; let mut buf = vec![0u8; expected_len]; @@ -287,7 +286,6 @@ impl<'l, 'o> Encoder<'l, 'o> { } #[cfg(feature = "std")] -#[cfg_attr(docsrs, doc(cfg(feature = "std")))] impl<'l, 'o> io::Write for Encoder<'l, 'o> { fn write(&mut self, buf: &[u8]) -> io::Result { self.encode(buf)?; diff --git a/vendor/pem-rfc7468/src/error.rs b/vendor/pem-rfc7468/src/error.rs index dd0ce87d5..6a93465b5 100644 --- a/vendor/pem-rfc7468/src/error.rs +++ b/vendor/pem-rfc7468/src/error.rs @@ -88,7 +88,6 @@ impl From for Error { } #[cfg(feature = "std")] -#[cfg_attr(docsrs, doc(cfg(feature = "std")))] impl From for std::io::Error { fn from(err: Error) -> std::io::Error { let kind = match err { diff --git a/vendor/pem-rfc7468/src/lib.rs b/vendor/pem-rfc7468/src/lib.rs index 15da39eed..45f4877df 100644 --- a/vendor/pem-rfc7468/src/lib.rs +++ b/vendor/pem-rfc7468/src/lib.rs @@ -1,18 +1,20 @@ #![no_std] -#![cfg_attr(docsrs, feature(doc_cfg))] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![doc = include_str!("../README.md")] #![doc( - html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg", - html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg" + html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg", + html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg" )] #![deny(unsafe_code)] #![warn( clippy::integer_arithmetic, + clippy::mod_module_files, clippy::panic, clippy::panic_in_result_fn, clippy::unwrap_used, missing_docs, rust_2018_idioms, + unused_lifetimes, unused_qualifications )] -- cgit v1.2.3