diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-04-08 15:45:50 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-04-08 19:17:19 +0200 |
commit | 759074ef27a8e5c7832c22cc6d110d2862d39a44 (patch) | |
tree | 7f760130638c4fd6d94ca5a36c7266a66aa041ce /tool/src | |
parent | 59588d78046c3d3a0b66ce104341fc0638aaeb0a (diff) |
openpgp: Move methods mapping and inspect to VerificationHelper.
Diffstat (limited to 'tool/src')
-rw-r--r-- | tool/src/commands/decrypt.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tool/src/commands/decrypt.rs b/tool/src/commands/decrypt.rs index 2a04a1bd..538636fb 100644 --- a/tool/src/commands/decrypt.rs +++ b/tool/src/commands/decrypt.rs @@ -114,15 +114,6 @@ impl<'a> Helper<'a> { } impl<'a> VerificationHelper for Helper<'a> { - fn get_certs(&mut self, ids: &[openpgp::KeyHandle]) -> Result<Vec<Cert>> { - self.vhelper.get_certs(ids) - } - fn check(&mut self, structure: MessageStructure) -> Result<()> { - self.vhelper.check(structure) - } -} - -impl<'a> DecryptionHelper for Helper<'a> { fn mapping(&self) -> bool { self.hex } @@ -137,6 +128,15 @@ impl<'a> DecryptionHelper for Helper<'a> { Ok(()) } + fn get_certs(&mut self, ids: &[openpgp::KeyHandle]) -> Result<Vec<Cert>> { + self.vhelper.get_certs(ids) + } + fn check(&mut self, structure: MessageStructure) -> Result<()> { + self.vhelper.check(structure) + } +} + +impl<'a> DecryptionHelper for Helper<'a> { fn decrypt<D>(&mut self, pkesks: &[PKESK], skesks: &[SKESK], sym_algo: Option<SymmetricAlgorithm>, mut decrypt: D) -> openpgp::Result<Option<Fingerprint>> |