Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkcs8: rename Error::EncryptedKey => ::EncryptedPrivateKey #214

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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