diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-01-07 13:49:47 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-01-07 13:55:20 +0100 |
commit | d4e05895735fd2acf3e9a10fd24a00b405b43f48 (patch) | |
tree | 6a4ff9c0339ce916d2ae34612beac67c8862fb41 /openpgp-ffi/src/parse/stream.rs | |
parent | 46b82da1232eda0e78b7d8053a65d8de8580b774 (diff) |
openpgp: Include the signing key's amalgamation in results.
- Only the amalgamation allows proper checking of a key's
properties, the binding signature alone isn't sufficient.
- Fixes #408.
Diffstat (limited to 'openpgp-ffi/src/parse/stream.rs')
-rw-r--r-- | openpgp-ffi/src/parse/stream.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/openpgp-ffi/src/parse/stream.rs b/openpgp-ffi/src/parse/stream.rs index b96a84ef..76d19785 100644 --- a/openpgp-ffi/src/parse/stream.rs +++ b/openpgp-ffi/src/parse/stream.rs @@ -190,7 +190,7 @@ fn $fn_name<'a>( -> bool { use self::stream::VerificationResult::*; - if let $variant { sig, cert, key, binding, revoked } = result.ref_raw() { + if let $variant { sig, cert, ka, time } = result.ref_raw() { if let Some(mut p) = sig_r { *unsafe { p.as_mut() } = sig.move_into_raw(); } @@ -199,17 +199,18 @@ fn $fn_name<'a>( } if let Some(mut p) = key_r { *unsafe { p.as_mut() } = { - let key = key + let key = ka.key() .mark_parts_unspecified_ref() .mark_role_unspecified_ref(); key.move_into_raw() }; } if let Some(mut p) = binding_r { - *unsafe { p.as_mut() } = binding.move_into_raw(); + *unsafe { p.as_mut() } = + ka.binding_signature(*time).move_into_raw(); } if let Some(mut p) = revocation_status_r { - *unsafe { p.as_mut() } = revoked.move_into_raw(); + *unsafe { p.as_mut() } = ka.revoked(*time).move_into_raw(); } true } else { |