diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-05-07 13:28:12 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-05-07 13:38:58 +0200 |
commit | bfb124b2e7bc3145d7aae4a26cf7cd75bbac8cc3 (patch) | |
tree | 5b7f0b9a68ac9503e72810d69a5dc9fe4f29e27d /tool | |
parent | be79f087fd2a0e3634ca753d9bdc554d32be5ee4 (diff) |
openpgp: Use a builder to construct DetachedVerifier.
- See #498.
Diffstat (limited to 'tool')
-rw-r--r-- | tool/src/commands/mod.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tool/src/commands/mod.rs b/tool/src/commands/mod.rs index 08219286..1639c087 100644 --- a/tool/src/commands/mod.rs +++ b/tool/src/commands/mod.rs @@ -19,14 +19,7 @@ use crate::openpgp::parse::{ Parse, PacketParserResult, }; -use crate::openpgp::parse::stream::{ - Verifier, DetachedVerifier, - GoodChecksum, - VerificationResult, - VerificationError, - VerificationHelper, - MessageStructure, MessageLayer, -}; +use crate::openpgp::parse::stream::*; use crate::openpgp::serialize::stream::{ Message, Signer, LiteralWriter, Encryptor, Recipient, Compressor, @@ -392,7 +385,8 @@ pub fn verify(ctx: &Context, policy: &dyn Policy, -> Result<()> { let helper = VHelper::new(ctx, mapping, signatures, certs); let helper = if let Some(dsig) = detached { - let mut v = DetachedVerifier::from_reader(policy, dsig, helper, None)?; + let mut v = DetachedVerifierBuilder::from_reader(dsig)? + .with_policy(policy, None, helper)?; v.verify_reader(input)?; v.into_helper() } else { |