#[non_exhaustive]pub enum CryptoError {
Show 27 variants
Unavailable(Algorithm),
PolicyEmpty(Family),
PolicyDuplicate(Algorithm),
PolicyDrift,
PolicyVersionUnusable {
version: TlsVersion,
family: Family,
},
NotFips,
KeyGeneration(Algorithm),
PrivateKey,
Verify,
Sign,
Csr(CsrError),
Tls(TlsError),
Random,
AeadKey,
AeadSeal,
AeadOpen,
SealPlaintext,
SealBlob,
SealVersion,
SealEphemeralKey,
SealPublicKey,
SealPrivateKey,
SealOpen,
Primitive,
EmptyProfile {
profile: Profile,
options: Options,
category: Family,
},
KeyNotInProfile {
profile: Profile,
algorithm: SignatureAlgorithm,
},
NotApproved {
algorithm: Algorithm,
approval: Approval,
},
}Expand description
A refusal from one of the crate’s operations. It never carries key or plaintext material.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
The algorithm is not available on this backend’s module.
PolicyEmpty(Family)
A TLS policy names nothing in this family.
PolicyDuplicate(Algorithm)
A TLS policy names this algorithm more than once.
PolicyDrift
A provider does not carry exactly a policy’s algorithms.
PolicyVersionUnusable
A TLS policy lists a version but names nothing in this family usable with it.
Fields
version: TlsVersionThe listed version.
NotFips
The process is not running the AWS-LC FIPS module, or a provider is not FIPS.
KeyGeneration(Algorithm)
Key generation failed.
PrivateKey
A private key was refused.
Verify
A signature did not verify.
Sign
Signing failed.
Csr(CsrError)
A certificate signing request could not be produced.
Tls(TlsError)
A TLS configuration step was refused.
Random
The random generator failed.
AeadKey
The AEAD key was refused.
AeadSeal
AEAD sealing failed.
AeadOpen
The AEAD ciphertext did not authenticate.
SealPlaintext
A sealed-box plaintext is empty.
SealBlob
A sealed blob is shorter than a header, one byte and a tag.
SealVersion
A sealed blob carries an unknown version.
SealEphemeralKey
A sealed blob’s ephemeral key is not an uncompressed P-384 point.
SealPublicKey
A sealing public key is not a canonical P-384 SubjectPublicKeyInfo.
SealPrivateKey
A sealing private key is not a P-384 PKCS#8 key.
SealOpen
A sealed blob does not open under this key, domain and AAD.
Primitive
A cryptographic primitive failed.
EmptyProfile
A profile, narrowed by its options, names nothing in a family.
Fields
KeyNotInProfile
A key algorithm the profile does not admit.
NotApproved
An algorithm the running module does not approve.
Trait Implementations§
Source§impl Clone for CryptoError
impl Clone for CryptoError
impl Copy for CryptoError
Source§impl Debug for CryptoError
impl Debug for CryptoError
Source§impl Display for CryptoError
impl Display for CryptoError
impl Eq for CryptoError
Source§impl Error for CryptoError
impl Error for CryptoError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()