#[non_exhaustive]pub enum EcdsaSignatureError {
NotEcdsa(JwsAlgorithm),
Unsupported(JwsAlgorithm),
InvalidDer(&'static str),
ComponentTooLong {
alg: JwsAlgorithm,
len: usize,
},
InvalidLength {
alg: JwsAlgorithm,
expected: usize,
actual: usize,
},
OutOfRange(JwsAlgorithm),
}Expand description
Why an ECDSA signature cannot be put in its JWS form; see
ecdsa_signature_from_der and
normalize_ecdsa_signature.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotEcdsa(JwsAlgorithm)
The algorithm is not ECDSA.
Unsupported(JwsAlgorithm)
The algorithm needs a feature this build does not have: ES256K without secp256k1.
InvalidDer(&'static str)
The input is not a strict DER ECDSA-Sig-Value.
ComponentTooLong
r or s is longer than the curve’s size.
Fields
§
alg: JwsAlgorithmThe algorithm.
InvalidLength
A raw signature is not twice the curve’s size.
Fields
§
alg: JwsAlgorithmThe algorithm.
OutOfRange(JwsAlgorithm)
r or s is zero or not below the group order.
Trait Implementations§
Source§impl Clone for EcdsaSignatureError
impl Clone for EcdsaSignatureError
Source§impl Debug for EcdsaSignatureError
impl Debug for EcdsaSignatureError
Source§impl Display for EcdsaSignatureError
impl Display for EcdsaSignatureError
impl Eq for EcdsaSignatureError
Source§impl Error for EcdsaSignatureError
impl Error for EcdsaSignatureError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for EcdsaSignatureError
impl PartialEq for EcdsaSignatureError
impl StructuralPartialEq for EcdsaSignatureError
Auto Trait Implementations§
impl Freeze for EcdsaSignatureError
impl RefUnwindSafe for EcdsaSignatureError
impl Send for EcdsaSignatureError
impl Sync for EcdsaSignatureError
impl Unpin for EcdsaSignatureError
impl UnsafeUnpin for EcdsaSignatureError
impl UnwindSafe for EcdsaSignatureError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.