diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-02-12 15:57:39 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-02-12 16:56:22 +0100 |
commit | c387f17444133ae637f782d3ba340ec7454b672d (patch) | |
tree | 358960e0f44c467d2f5959cf27774caa53d56ee7 /openpgp-ffi | |
parent | 251e9fa5dccdde942109dfd72c2469991fc566fb (diff) |
openpgp-ffi: Use the correct type.
Diffstat (limited to 'openpgp-ffi')
-rw-r--r-- | openpgp-ffi/include/sequoia/openpgp.h | 2 | ||||
-rw-r--r-- | openpgp-ffi/src/packet/key.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/openpgp-ffi/include/sequoia/openpgp.h b/openpgp-ffi/include/sequoia/openpgp.h index 19a98391..523838ba 100644 --- a/openpgp-ffi/include/sequoia/openpgp.h +++ b/openpgp-ffi/include/sequoia/openpgp.h @@ -1333,7 +1333,7 @@ pgp_status_t pgp_skesk_decrypt (pgp_error_t *errp, pgp_skesk_t skesk, /*/ /// Returns the key's creation time. /*/ -uint32_t pgp_key_creation_time (pgp_key_t p); +time_t pgp_key_creation_time (pgp_key_t p); /* openpgp::parse. */ diff --git a/openpgp-ffi/src/packet/key.rs b/openpgp-ffi/src/packet/key.rs index 29c1d384..7e17c507 100644 --- a/openpgp-ffi/src/packet/key.rs +++ b/openpgp-ffi/src/packet/key.rs @@ -4,7 +4,7 @@ //! //! [Section 5.5 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-5.5 -use libc::c_int; +use libc::{c_int, time_t}; extern crate sequoia_openpgp as openpgp; use self::openpgp::{ @@ -44,12 +44,12 @@ pub extern "system" fn pgp_key_keyid(key: *const packet::Key) /// Returns the key's creation time. #[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "system" fn pgp_key_creation_time(key: *const packet::Key) - -> u32 + -> time_t { let key = ffi_param_ref!(key); let ct = key.creation_time(); - ct.to_timespec().sec as u32 + ct.to_timespec().sec as time_t } /// Returns the key's public key algorithm. |