diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-02-12 10:27:30 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-02-12 10:27:30 +0100 |
commit | 605da7f5442617757d36a40434200e9ff3287f1b (patch) | |
tree | eaaa1d81e205b0ad2cc1160a950527b2c245df50 /openpgp-ffi | |
parent | e9be3b2e7bea44e7f877efe902ff8d5b10eaa53a (diff) |
openpgp: Use a Signer to set the expiry.
Diffstat (limited to 'openpgp-ffi')
-rw-r--r-- | openpgp-ffi/src/tpk.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/openpgp-ffi/src/tpk.rs b/openpgp-ffi/src/tpk.rs index 039b5430..a816fb31 100644 --- a/openpgp-ffi/src/tpk.rs +++ b/openpgp-ffi/src/tpk.rs @@ -344,11 +344,14 @@ fn pgp_tpk_alive_at(tpk: *const TPK, when: time_t) /// This function consumes `tpk` and returns a new `TPK`. #[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "system" fn pgp_tpk_set_expiry(errp: Option<&mut *mut ::error::Error>, - tpk: *mut TPK, expiry: u32) + tpk: *mut TPK, primary_signer: *mut Box<crypto::Signer>, + expiry: u32) -> Maybe<TPK> { let tpk = tpk.move_from_raw(); + let signer = ffi_param_ref_mut!(primary_signer); - tpk.set_expiry(Some(time::Duration::seconds(expiry as i64))) + tpk.set_expiry(signer.as_mut(), + Some(time::Duration::seconds(expiry as i64))) .move_into_raw(errp) } |