summaryrefslogtreecommitdiffstats
path: root/openpgp/src/crypto/asymmetric.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-06-24 09:52:21 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-06-24 16:12:06 +0200
commit660e5352c0cb57f0a9f49bf0d9367b723884f2db (patch)
tree7c60a9c308876bc883435f85dc152f0d6033de68 /openpgp/src/crypto/asymmetric.rs
parente13a57f9f9867616d027694d2ef2c8133388e0a6 (diff)
openpgp: Fix error.
Diffstat (limited to 'openpgp/src/crypto/asymmetric.rs')
-rw-r--r--openpgp/src/crypto/asymmetric.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/crypto/asymmetric.rs b/openpgp/src/crypto/asymmetric.rs
index 96bc1694..539a9dc5 100644
--- a/openpgp/src/crypto/asymmetric.rs
+++ b/openpgp/src/crypto/asymmetric.rs
@@ -193,7 +193,7 @@ impl Signer for KeyPair {
})
},
- (pk_algo, _, _) => Err(Error::InvalidArgument(format!(
+ (pk_algo, _, _) => Err(Error::InvalidOperation(format!(
"unsupported combination of algorithm {:?}, key {:?}, \
and secret key {:?}",
pk_algo, self.public, self.secret)).into()),
@@ -240,7 +240,7 @@ impl Decryptor for KeyPair {
ciphertext)?,
(public, secret, ciphertext) =>
- return Err(Error::MalformedPacket(format!(
+ return Err(Error::InvalidOperation(format!(
"unsupported combination of key pair {:?}/{:?} \
and ciphertext {:?}",
public, secret, ciphertext)).into()),