pub struct DefaultVerifier;Available on crate features
p256 or rsa only.Expand description
A SignatureVerifier that dispatches to available RustCrypto backends by OID.
This is the recommended out-of-the-box verifier for applications that use the default RustCrypto feature set. It supports:
ecdsa-with-SHA256(1.2.840.10045.4.3.2) — via thep256featuresha256WithRSAEncryption(1.2.840.113549.1.1.11) — via thersafeature
Any OID not in the above set returns Err(signature::Error::new()).
To support additional algorithms, implement SignatureVerifier directly
and dispatch your own OID table.
Trait Implementations§
Source§impl SignatureVerifier for DefaultVerifier
impl SignatureVerifier for DefaultVerifier
Source§fn verify_signature(
&self,
algorithm: AlgorithmIdentifierRef<'_>,
issuer_spki: SubjectPublicKeyInfoRef<'_>,
message: &[u8],
signature: &[u8],
) -> Result<(), SignatureError>
fn verify_signature( &self, algorithm: AlgorithmIdentifierRef<'_>, issuer_spki: SubjectPublicKeyInfoRef<'_>, message: &[u8], signature: &[u8], ) -> Result<(), SignatureError>
Auto Trait Implementations§
impl Freeze for DefaultVerifier
impl RefUnwindSafe for DefaultVerifier
impl Send for DefaultVerifier
impl Sync for DefaultVerifier
impl Unpin for DefaultVerifier
impl UnsafeUnpin for DefaultVerifier
impl UnwindSafe for DefaultVerifier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more