diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-01-20 10:32:51 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-01-20 10:34:40 +0100 |
commit | a1230b3a6c31d77fff4626814de4a681e2f2a3a0 (patch) | |
tree | 58ec2fd279c1eb57c022390f04377b7491f8ee27 /openpgp-ffi | |
parent | 312ad42659b6b16983981dfbc891972cd0ff9e01 (diff) |
openpgp: Use the new framework for Cert::userid.
- Fixes #414.
Diffstat (limited to 'openpgp-ffi')
-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 b9cdb93e..1b4bc65d 100644 --- a/openpgp-ffi/src/cert.rs +++ b/openpgp-ffi/src/cert.rs @@ -362,7 +362,7 @@ fn pgp_cert_primary_user_id(cert: *const Cert) -> *mut c_char { let cert = cert.ref_raw(); - if let Some(binding) = cert.userids().nth(0) { + if let Some(binding) = cert.userids().primary(None) { ffi_return_string!(binding.userid().value()) } else { ptr::null_mut() @@ -407,7 +407,7 @@ pub extern "C" fn pgp_cert_user_id_binding_iter(cert: *const Cert) -> *mut UserIDBindingIter<'static> { let cert = cert.ref_raw(); - box_raw!(cert.userids()) + box_raw!(cert.userids().components()) } /// Frees a pgp_user_id_binding_iter_t. |