Skip to content

Commit

Permalink
pkcs8: rename Error::EncryptedKey => ::EncryptedPrivateKey (#214)
Browse files Browse the repository at this point in the history
More consistent with the rest of the type names
  • Loading branch information
tarcieri committed Nov 14, 2021
1 parent edb2c6a commit 3d1aaee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkcs8/src/error.rs
Expand Up @@ -14,7 +14,7 @@ pub enum Error {

/// Errors relating to PKCS#5-encrypted keys.
#[cfg(feature = "pkcs5")]
EncryptedKey(pkcs5::Error),
EncryptedPrivateKey(pkcs5::Error),

/// Malformed cryptographic key contained in a PKCS#8 document.
///
Expand All @@ -36,7 +36,7 @@ impl fmt::Display for Error {
match self {
Error::Asn1(err) => write!(f, "PKCS#8 ASN.1 error: {}", err),
#[cfg(feature = "pkcs5")]
Error::EncryptedKey(err) => write!(f, "{}", err),
Error::EncryptedPrivateKey(err) => write!(f, "{}", err),
Error::KeyMalformed => f.write_str("PKCS#8 cryptographic key data malformed"),
Error::ParametersMalformed => f.write_str("PKCS#8 algorithm parameters malformed"),
Error::PublicKey(err) => write!(f, "public key error: {}", err),
Expand All @@ -62,7 +62,7 @@ impl From<der::ErrorKind> for Error {
#[cfg(feature = "pkcs5")]
impl From<pkcs5::Error> for Error {
fn from(err: pkcs5::Error) -> Error {
Error::EncryptedKey(err)
Error::EncryptedPrivateKey(err)
}
}

Expand Down

0 comments on commit 3d1aaee

Please sign in to comment.