summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2019-09-27 13:12:56 +0200
committerNeal H. Walfield <neal@pep.foundation>2019-09-27 13:12:56 +0200
commit98873c3c66cc09075a1f2f2037c5fadadb248102 (patch)
tree2b01d12707ed18026a835d1ff5abec58f4fa68c2 /openpgp-ffi
parent273eb093742cc8bb3c14ee9c189a1eff0844e314 (diff)
openpgp: Replace use of TPK::revoke with TPKRevocationBuilder.
- TPK::revoke is now redundant. Remove it.
Diffstat (limited to 'openpgp-ffi')
-rw-r--r--openpgp-ffi/src/tpk.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/openpgp-ffi/src/tpk.rs b/openpgp-ffi/src/tpk.rs
index 613dc2d4..b11f4f88 100644
--- a/openpgp-ffi/src/tpk.rs
+++ b/openpgp-ffi/src/tpk.rs
@@ -23,6 +23,7 @@ use self::openpgp::{
KeyIter,
TPKBuilder,
TPKParser,
+ TPKRevocationBuilder,
UserIDBinding,
UserIDBindingIter,
},
@@ -253,7 +254,10 @@ fn pgp_tpk_revoke(errp: Option<&mut *mut crate::error::Error>,
b""
};
- tpk.revoke(signer.as_mut(), code, reason).move_into_raw(errp)
+ let builder = TPKRevocationBuilder::new();
+ let builder = ffi_try_or!(builder.set_reason_for_revocation(code, reason), None);
+ let sig = builder.build(signer.as_mut(), tpk, None);
+ sig.move_into_raw(errp)
}
/// Adds a revocation certificate to the tpk.