summaryrefslogtreecommitdiffstats
path: root/vendor/signature
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
commit9918693037dce8aa4bb6f08741b6812923486c18 (patch)
tree21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /vendor/signature
parentReleasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff)
downloadrustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz
rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/signature')
-rw-r--r--vendor/signature/.cargo-checksum.json2
-rw-r--r--vendor/signature/CHANGELOG.md10
-rw-r--r--vendor/signature/Cargo.toml11
-rw-r--r--vendor/signature/README.md4
-rw-r--r--vendor/signature/src/error.rs13
-rw-r--r--vendor/signature/src/lib.rs18
-rw-r--r--vendor/signature/tests/derive.rs6
7 files changed, 39 insertions, 25 deletions
diff --git a/vendor/signature/.cargo-checksum.json b/vendor/signature/.cargo-checksum.json
index 9d2d453d0..2978ad55e 100644
--- a/vendor/signature/.cargo-checksum.json
+++ b/vendor/signature/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"CHANGELOG.md":"e1dc1a42d89c604d5bfcdd31f0ecda5442fde141fbdaed5ec27741f799a08684","Cargo.toml":"86b4f84f3ef286ed13cf6b2880192db068ae80eadff89955331946c8a253c2d9","LICENSE-APACHE":"a9040321c3712d8fd0b09cf52b17445de04a23a10165049ae187cd39e5c86be5","LICENSE-MIT":"b3470648aff02beb36d7a53240fc9260ed80ed93bd43bace6b67d7ef7336ee33","README.md":"98b8d705baaeb9df4925fd4c5726637f99aaa5cd52183c18c05440647739c146","src/encoding.rs":"872ae940d329d523335d1e28379de898f25ccf98c3366a6773a6728a9e0e1992","src/error.rs":"8673e5193b0571ef7b1212f5e3d3005b2929d1186c38a7911a676db466929a20","src/hazmat.rs":"c662aeb812a9ce24d0e2c7dedeca7d9ae7002bd527cbd484557b04a41bab1817","src/keypair.rs":"9b2f6cda46e3fe8c29b571b912745f4dfb7c6a1186c56790f0e3fd080ab3bdf7","src/lib.rs":"0c00057818e179cc12090292aa7244ab1a60fe3151a1464acfc5dad5b9ea1fe8","src/prehash_signature.rs":"74b7641cfcf5692625adec58b550ac3a12125983e12076c4e811be7f28462a0c","src/signer.rs":"20a50c3c2fc0ef678e1ca87aca9c75527794bd66cf52583aa941b13b3f1ee1da","src/verifier.rs":"4eaeb33529879b3bbfc13442a5823905ca05f8f27316192360f9bbd416822976","tests/derive.rs":"ec2f5f0e33296a1b48f4804e5488d58b98b41d0570de5b7e6c5e809ca0ade3fc"},"package":"5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500"} \ No newline at end of file
+{"files":{"CHANGELOG.md":"2449de0a06c0b7cc8befcca6d8401ac054e96556f06c0b4dfd1e9048f92813f6","Cargo.toml":"9a0ed264f832101d9e2e786db0e22d90a2a2544ed19c760ec7f2d501d950a9dd","LICENSE-APACHE":"a9040321c3712d8fd0b09cf52b17445de04a23a10165049ae187cd39e5c86be5","LICENSE-MIT":"b3470648aff02beb36d7a53240fc9260ed80ed93bd43bace6b67d7ef7336ee33","README.md":"abe06adcdfc61ddd24c4a1007b6da73a9c83acf9f2cad76bcb394cdb9341ba5a","src/encoding.rs":"872ae940d329d523335d1e28379de898f25ccf98c3366a6773a6728a9e0e1992","src/error.rs":"26b85a7b2671363cd92faad5d3cc511797df2792d79f29c4373535516e91b247","src/hazmat.rs":"c662aeb812a9ce24d0e2c7dedeca7d9ae7002bd527cbd484557b04a41bab1817","src/keypair.rs":"9b2f6cda46e3fe8c29b571b912745f4dfb7c6a1186c56790f0e3fd080ab3bdf7","src/lib.rs":"9ad89b20efad0859a136f4dbee92f643e345afb3c5235a31d5b2ec72556b3b76","src/prehash_signature.rs":"74b7641cfcf5692625adec58b550ac3a12125983e12076c4e811be7f28462a0c","src/signer.rs":"20a50c3c2fc0ef678e1ca87aca9c75527794bd66cf52583aa941b13b3f1ee1da","src/verifier.rs":"4eaeb33529879b3bbfc13442a5823905ca05f8f27316192360f9bbd416822976","tests/derive.rs":"980390b69a0d0bcbbab26e086727bc91ada0fad21c38bb961a0a143260eb8375"},"package":"77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"} \ No newline at end of file
diff --git a/vendor/signature/CHANGELOG.md b/vendor/signature/CHANGELOG.md
index 4f999de55..3f9d8cd08 100644
--- a/vendor/signature/CHANGELOG.md
+++ b/vendor/signature/CHANGELOG.md
@@ -4,6 +4,16 @@ 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).
+## 2.2.0 (2023-11-12)
+### Changed
+- MSRV 1.60 ([#1387])
+
+### Fixed
+- No longer vendoring async/derive crates unintentionally ([#1391])
+
+[#1387]: https://github.com/RustCrypto/traits/pull/1387
+[#1391]: https://github.com/RustCrypto/traits/pull/1391
+
## 2.1.0 (2023-04-01)
### Added
- `SignatureEncoding::encoded_len` ([#1283])
diff --git a/vendor/signature/Cargo.toml b/vendor/signature/Cargo.toml
index 2d2391580..871099e1c 100644
--- a/vendor/signature/Cargo.toml
+++ b/vendor/signature/Cargo.toml
@@ -11,9 +11,9 @@
[package]
edition = "2021"
-rust-version = "1.56"
+rust-version = "1.60"
name = "signature"
-version = "2.1.0"
+version = "2.2.0"
authors = ["RustCrypto Developers"]
description = "Traits for cryptographic signature algorithms (e.g. ECDSA, Ed25519)"
documentation = "https://docs.rs/signature"
@@ -55,7 +55,7 @@ optional = true
default-features = false
[dev-dependencies.hex-literal]
-version = "0.3"
+version = "0.4"
[dev-dependencies.sha2]
version = "0.10"
@@ -63,4 +63,7 @@ default-features = false
[features]
alloc = []
-std = ["alloc"]
+std = [
+ "alloc",
+ "rand_core?/std",
+]
diff --git a/vendor/signature/README.md b/vendor/signature/README.md
index 6f205d603..5e1100301 100644
--- a/vendor/signature/README.md
+++ b/vendor/signature/README.md
@@ -17,7 +17,7 @@ the [RustCrypto] organization, as well as [`ed25519-dalek`].
## Minimum Supported Rust Version
-Rust **1.56** or higher.
+Rust **1.60** or higher.
Minimum supported Rust version can be changed in the future, but it will be
done with a minor version bump.
@@ -56,7 +56,7 @@ dual licensed as above, without any additional terms or conditions.
[build-image]: https://github.com/RustCrypto/traits/actions/workflows/signature.yml/badge.svg
[build-link]: https://github.com/RustCrypto/traits/actions/workflows/signature.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/260048-signatures
diff --git a/vendor/signature/src/error.rs b/vendor/signature/src/error.rs
index 1bfaf33bf..6518f17b8 100644
--- a/vendor/signature/src/error.rs
+++ b/vendor/signature/src/error.rs
@@ -93,6 +93,19 @@ impl From<Box<dyn std::error::Error + Send + Sync + 'static>> for Error {
}
}
+#[cfg(feature = "rand_core")]
+impl From<rand_core::Error> for Error {
+ #[cfg(not(feature = "std"))]
+ fn from(_source: rand_core::Error) -> Error {
+ Error::new()
+ }
+
+ #[cfg(feature = "std")]
+ fn from(source: rand_core::Error) -> Error {
+ Error::from_source(source)
+ }
+}
+
#[cfg(feature = "std")]
impl std::error::Error for Error {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
diff --git a/vendor/signature/src/lib.rs b/vendor/signature/src/lib.rs
index ba1feb494..c90f5cc8a 100644
--- a/vendor/signature/src/lib.rs
+++ b/vendor/signature/src/lib.rs
@@ -92,13 +92,12 @@
//! and compiler errors, and in our experience makes them unsuitable for this
//! sort of API. We believe such an API is the natural one for signature
//! systems, reflecting the natural way they are written absent a trait.
-//! - Associated types preclude multiple (or generic) implementations of the
-//! same trait. These parameters are common in signature systems, notably
-//! ones which support different digest algorithms.
+//! - Associated types preclude multiple implementations of the same trait.
+//! These parameters are common in signature systems, notably ones which
+//! support different serializations of a signature (e.g. raw vs ASN.1).
//! - Digital signatures are almost always larger than the present 32-entry
-//! trait impl limitation on array types, which complicates trait signatures
+//! trait impl limitation on array types, which complicates bounds
//! for these types (particularly things like `From` or `Borrow` bounds).
-//! This may be more interesting to explore after const generics.
//!
//! ## Unstable features
//!
@@ -111,15 +110,6 @@
//!
//! The following unstable features are presently supported:
//!
-//! - `derive`: for implementers of signature systems using [`DigestSigner`]
-//! and [`DigestVerifier`], the `derive` feature can be used to
-//! derive [`Signer`] and [`Verifier`] traits which prehash the input
-//! message using the [`PrehashSignature::Digest`] algorithm for
-//! a given signature type. When the `derive` feature is enabled
-//! import the proc macros with `use signature::{Signer, Verifier}` and then
-//! add a `derive(Signer)` or `derive(Verifier)` attribute to the given
-//! digest signer/verifier type. Enabling this feature also enables `digest`
-//! support (see immediately below).
//! - `digest`: enables the [`DigestSigner`] and [`DigestVerifier`]
//! traits which are based on the [`Digest`] trait from the [`digest`] crate.
//! These traits are used for representing signature systems based on the
diff --git a/vendor/signature/tests/derive.rs b/vendor/signature/tests/derive.rs
index 70e2dc0fc..b54eec823 100644
--- a/vendor/signature/tests/derive.rs
+++ b/vendor/signature/tests/derive.rs
@@ -1,6 +1,6 @@
//! Tests for code generated by `signature_derive`
-#![cfg(feature = "derive")]
+#![cfg(all(feature = "derive", feature = "digest"))]
use digest::{generic_array::GenericArray, Digest, OutputSizeUser};
use hex_literal::hex;
@@ -35,9 +35,7 @@ impl TryFrom<&[u8]> for DummySignature {
type Error = Error;
fn try_from(bytes: &[u8]) -> Result<Self, Error> {
- Ok(DummySignature(GenericArray::clone_from_slice(
- bytes.as_ref(),
- )))
+ Ok(DummySignature(GenericArray::clone_from_slice(bytes)))
}
}