diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:19 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:19 +0000 |
commit | a0b8f38ab54ac451646aa00cd5e91b6c76f22a84 (patch) | |
tree | fc451898ccaf445814e26b46664d78702178101d /vendor/spki/src/traits.rs | |
parent | Adding debian version 1.71.1+dfsg1-2. (diff) | |
download | rustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.tar.xz rustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.zip |
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/spki/src/traits.rs')
-rw-r--r-- | vendor/spki/src/traits.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/vendor/spki/src/traits.rs b/vendor/spki/src/traits.rs index 1126c7c40..764b02a4a 100644 --- a/vendor/spki/src/traits.rs +++ b/vendor/spki/src/traits.rs @@ -6,7 +6,7 @@ use der::{EncodeValue, Tagged}; #[cfg(feature = "alloc")] use { crate::AlgorithmIdentifierOwned, - der::{Any, Document}, + der::{asn1::BitString, Any, Document}, }; #[cfg(feature = "pem")] @@ -173,3 +173,12 @@ where }) } } + +/// Returns the `BitString` encoding of the signature. +/// +/// X.509 and CSR structures require signatures to be BitString encoded. +#[cfg(feature = "alloc")] +pub trait SignatureBitStringEncoding { + /// `BitString` encoding for this signature. + fn to_bitstring(&self) -> der::Result<BitString>; +} |