diff options
author | Neal H. Walfield <neal@pep.foundation> | 2020-03-13 14:10:00 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2020-03-13 14:19:47 +0100 |
commit | 99fc174dafc91db07cd9689dbe659ea4b531fbfe (patch) | |
tree | 9b66ef0f8cf682cfebf51634b1cc33e56cd90933 /openpgp-ffi/src/cert.rs | |
parent | e56516dafeb46d701725684e8fd11074350b7443 (diff) |
openpgp-ffi: Add missing argument to pgp_cert_primary_user_id.
- Make the reference time an argument to pgp_cert_primary_user_id.
Diffstat (limited to 'openpgp-ffi/src/cert.rs')
-rw-r--r-- | openpgp-ffi/src/cert.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/openpgp-ffi/src/cert.rs b/openpgp-ffi/src/cert.rs index 6a781411..f25296ef 100644 --- a/openpgp-ffi/src/cert.rs +++ b/openpgp-ffi/src/cert.rs @@ -357,12 +357,13 @@ fn pgp_cert_is_tsk(cert: *const Cert) /// Returns an iterator over the Cert's user id bindings. #[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C" -fn pgp_cert_primary_user_id(cert: *const Cert, policy: *const Policy) +fn pgp_cert_primary_user_id(cert: *const Cert, policy: *const Policy, + when: time_t) -> *mut c_char { let cert = cert.ref_raw(); let policy = &**policy.ref_raw(); - if let Some(binding) = cert.primary_userid(policy, None) { + if let Some(binding) = cert.primary_userid(policy, maybe_time(when)) { ffi_return_string!(binding.userid().value()) } else { ptr::null_mut() |