diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-05-06 11:35:46 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-05-06 11:35:46 +0200 |
commit | c575a9b4d3d0644457d3a2ddfbfa0160d3490f19 (patch) | |
tree | 4c534f4baafc1121faaf75fd65a73a503752febd /openpgp-ffi/src/cert.rs | |
parent | dd22ba5e10be4958755ae250305f58a40b60c1a9 (diff) |
openpgp: Don't merge signatures in Cert::set_expiration_time.
- Align Cert::set_expiration_time with
KeyAmalgamation::set_expiration_time, i.e. return the signatures
instead of merging them directly.
- Fixes #491.
Diffstat (limited to 'openpgp-ffi/src/cert.rs')
-rw-r--r-- | openpgp-ffi/src/cert.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/openpgp-ffi/src/cert.rs b/openpgp-ffi/src/cert.rs index 659c5210..47abe39d 100644 --- a/openpgp-ffi/src/cert.rs +++ b/openpgp-ffi/src/cert.rs @@ -279,13 +279,14 @@ fn pgp_cert_set_expiration_time(errp: Option<&mut *mut crate::error::Error>, expiry: time_t) -> Maybe<Cert> { + ffi_make_fry_from_errp!(errp); let policy = &**policy.ref_raw(); let cert = cert.move_from_raw(); let signer = ffi_param_ref_mut!(primary_signer); - cert.set_expiration_time(policy, None, signer.as_mut(), - maybe_time(expiry)) - .move_into_raw(errp) + let sigs = ffi_try_or!(cert.set_expiration_time(policy, None, signer.as_mut(), + maybe_time(expiry)), None); + cert.merge_packets(sigs).move_into_raw(errp) } /// Returns whether the Cert includes any secret key material. |