diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-11-26 13:57:42 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-11-26 15:22:34 +0100 |
commit | 0a432bfb0f17048ef7e1bdf672cb0aa6e4cd5786 (patch) | |
tree | 8e8336bfd0d7a1e1dba6b31ff18fe54fb190a9e7 /openpgp-ffi/src/cert.rs | |
parent | 67ec527d0ee1e15745e163ed1c550b385f885265 (diff) |
openpgp: Add a lifetime to CertBuilder.
- This will allow us to use the CertBuilder to change certificates
with detached secret keys in the future.
- Fixes #608.
Diffstat (limited to 'openpgp-ffi/src/cert.rs')
-rw-r--r-- | openpgp-ffi/src/cert.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp-ffi/src/cert.rs b/openpgp-ffi/src/cert.rs index 84fd520d..6eecd3d3 100644 --- a/openpgp-ffi/src/cert.rs +++ b/openpgp-ffi/src/cert.rs @@ -906,7 +906,7 @@ pub extern "C" fn pgp_cert_parser_free(parser: Option<&mut CertParserWrapper>) /// pgp_cert_free (cert); /// ``` #[::sequoia_ffi_macros::extern_fn] #[no_mangle] -pub extern "C" fn pgp_cert_builder_new() -> *mut CertBuilder { +pub extern "C" fn pgp_cert_builder_new() -> *mut CertBuilder<'static> { box_raw!(CertBuilder::new()) } @@ -917,7 +917,7 @@ pub extern "C" fn pgp_cert_builder_new() -> *mut CertBuilder { #[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C" fn pgp_cert_builder_general_purpose(cs: c_int, uid: *const c_char) - -> *mut CertBuilder + -> *mut CertBuilder<'static> { let uid = if uid.is_null() { None |