summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-02-06 17:46:56 +0100
committerJustus Winter <justus@sequoia-pgp.org>2020-02-06 18:01:33 +0100
commit6953b4f9902f5f524e92a15518d0132fb662704a (patch)
treea02b4e656196a674146709ad42f32f4b295dcac3 /openpgp-ffi
parent2bd001a81fa53e4f3cbc972f6354c8e3e510d1c7 (diff)
autocrypt: New crate.
- Move the autocrypt-related functionality to a new crate. - Fixes #424.
Diffstat (limited to 'openpgp-ffi')
-rw-r--r--openpgp-ffi/include/sequoia/openpgp.h7
-rw-r--r--openpgp-ffi/src/cert.rs24
2 files changed, 0 insertions, 31 deletions
diff --git a/openpgp-ffi/include/sequoia/openpgp.h b/openpgp-ffi/include/sequoia/openpgp.h
index 647bc4af..ade7bf1b 100644
--- a/openpgp-ffi/include/sequoia/openpgp.h
+++ b/openpgp-ffi/include/sequoia/openpgp.h
@@ -1020,13 +1020,6 @@ pgp_cert_builder_t pgp_cert_builder_general_purpose(pgp_cert_cipher_suite_t cs,
const char *uid);
/*/
-/// Generates a key compliant to [Autocrypt Level 1].
-///
-/// [Autocrypt Level 1]: https://autocrypt.org/level1.html
-/*/
-pgp_cert_builder_t pgp_cert_builder_autocrypt(const char *uid);
-
-/*/
/// Frees an `pgp_cert_builder_t`.
/*/
void pgp_cert_builder_free(pgp_cert_builder_t certb);
diff --git a/openpgp-ffi/src/cert.rs b/openpgp-ffi/src/cert.rs
index ca8a9cf7..b0ca0275 100644
--- a/openpgp-ffi/src/cert.rs
+++ b/openpgp-ffi/src/cert.rs
@@ -11,7 +11,6 @@ use libc::{c_char, c_int, size_t, time_t};
extern crate sequoia_openpgp as openpgp;
use self::openpgp::{
- autocrypt::Autocrypt,
crypto,
types::ReasonForRevocation,
parse::{
@@ -920,29 +919,6 @@ pub extern "C" fn pgp_cert_builder_general_purpose(cs: c_int,
Some(int_to_cipher_suite(cs)), uid))
}
-/// Generates a key compliant to [Autocrypt Level 1].
-///
-/// Autocrypt requires a user id, however, if `uid` is NULL, a Cert is
-/// created without any user ids. It is then the caller's
-/// responsibility to ensure that a user id is added later.
-///
-/// `uid` must contain valid UTF-8. If it does not contain valid
-/// UTF-8, then the invalid code points are silently replaced with
-/// `U+FFFD REPLACEMENT CHARACTER`.
-///
-/// [Autocrypt Level 1]: https://autocrypt.org/level1.html
-#[::sequoia_ffi_macros::extern_fn] #[no_mangle]
-pub extern "C" fn pgp_cert_builder_autocrypt(uid: *const c_char)
- -> *mut CertBuilder
-{
- let uid = if uid.is_null() {
- None
- } else {
- Some(ffi_param_cstr!(uid).to_string_lossy())
- };
- box_raw!(CertBuilder::autocrypt(Autocrypt::V1, uid))
-}
-
/// Frees an `pgp_cert_builder_t`.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle]
pub extern "C" fn pgp_cert_builder_free(certb: Option<&mut CertBuilder>)