summaryrefslogtreecommitdiffstats
path: root/openpgp/src/packet/pkesk.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-12-05 16:13:54 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-12-05 16:21:52 +0100
commit41fd3f08adff856ec558f8b06214e0f392893a26 (patch)
treee7894d4e77074109692503fab3b3b46d343f70b6 /openpgp/src/packet/pkesk.rs
parent71a3a540bda400f52a841c04b8d33a51959fa8f0 (diff)
openpgp: Make crypto::{Signer,Decryptor} non-polymorphic.
- These are low-level cryptographic traits that are not concerned with the role of a key. - Fixes #382.
Diffstat (limited to 'openpgp/src/packet/pkesk.rs')
-rw-r--r--openpgp/src/packet/pkesk.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/openpgp/src/packet/pkesk.rs b/openpgp/src/packet/pkesk.rs
index f307dd9c..db88c215 100644
--- a/openpgp/src/packet/pkesk.rs
+++ b/openpgp/src/packet/pkesk.rs
@@ -149,9 +149,8 @@ impl PKESK3 {
/// Decrypts the ESK and returns the session key and symmetric algorithm
/// used to encrypt the following payload.
- pub fn decrypt<R>(&self, decryptor: &mut dyn Decryptor<R>)
+ pub fn decrypt(&self, decryptor: &mut dyn Decryptor)
-> Result<(SymmetricAlgorithm, SessionKey)>
- where R: key::KeyRole
{
let plain = decryptor.decrypt(&self.esk)?;
let key_rgn = 1..(plain.len() - 2);