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 /openpgp-ffi/src | |
parent | be79f087fd2a0e3634ca753d9bdc554d32be5ee4 (diff) |
openpgp: Use a builder to construct DetachedVerifier.
- See #498.
Diffstat (limited to 'openpgp-ffi/src')
-rw-r--r-- | openpgp-ffi/src/parse/stream.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/openpgp-ffi/src/parse/stream.rs b/openpgp-ffi/src/parse/stream.rs index da9d45c3..227b75a4 100644 --- a/openpgp-ffi/src/parse/stream.rs +++ b/openpgp-ffi/src/parse/stream.rs @@ -23,6 +23,7 @@ use self::openpgp::{ PKESK, SKESK, }, + parse::Parse, }; use self::openpgp::parse::stream::{ self, @@ -769,12 +770,14 @@ fn pgp_detached_verifier_new<'a>(errp: Option<&mut *mut crate::error::Error>, time: time_t) -> Maybe<DetachedVerifier> { + ffi_make_fry_from_errp!(errp); let policy = policy.ref_raw().as_ref(); let helper = VHelper::new(inspect, get_certs, check, cookie); - openpgp::parse::stream::DetachedVerifier::from_reader( - policy, signature_input.ref_mut_raw(), helper, maybe_time(time)) + ffi_try_or!(openpgp::parse::stream::DetachedVerifierBuilder::from_reader( + signature_input.ref_mut_raw()), None) + .with_policy(policy, maybe_time(time), helper) .move_into_raw(errp) } |