pub enum KeyFileError {
Show 15 variants
Io(Error),
NotRegular,
Owner,
Permissions,
TooLarge,
BadKeyFile,
WrongPurpose(Purpose),
WrongProfile(Profile),
WrongAlgorithms,
WrongKeySize,
PrivateKeyInvalid,
PublicKeyMismatch,
RoundTripFailed,
KeyStore(KeyStoreError),
Generate(KeyError),
}Expand description
Why a key file was not saved or loaded.
Variants§
Io(Error)
Reading or writing the file failed.
NotRegular
The path names something other than a regular file, directly or through a symlink.
Owner
Another user than the effective user owns the file.
Permissions
The file’s group or others can read it.
TooLarge
The file is longer than 64 KiB, which no key file is.
BadKeyFile
The file is not a key file in the seed form.
WrongPurpose(Purpose)
The file holds a key for another purpose, named here.
WrongProfile(Profile)
The file holds a key for another profile, named here.
WrongAlgorithms
The key’s halves do not fit its profile.
WrongKeySize
The RSA-PSS half is not a 4,096-bit key with exponent 65537.
PrivateKeyInvalid
A private key does not decode.
PublicKeyMismatch
A stored public key is not the one its private key derives.
RoundTripFailed
The key does not sign and verify as a whole.
KeyStore(KeyStoreError)
The key store could not save or load the key.
Generate(KeyError)
A new key could not be made.
Trait Implementations§
Source§impl Debug for KeyFileError
impl Debug for KeyFileError
Source§impl Display for KeyFileError
impl Display for KeyFileError
Source§impl Error for KeyFileError
impl Error for KeyFileError
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()