mirror of
https://github.com/chatmail/core.git
synced 2026-04-29 11:26:29 +03:00
cleanup: fixup deadcode
This commit is contained in:
@@ -13,6 +13,7 @@ pub type public_or_secret_key = PublicOrSecret;
|
||||
/// Creates an in-memory representation of a PGP key, based on the armor file given.
|
||||
/// The returned pointer should be stored, and reused when calling methods "on" this key.
|
||||
/// When done with it [rpgp_key_drop] should be called, to free the memory.
|
||||
#[allow(dead_code)]
|
||||
pub unsafe fn rpgp_key_from_armor(raw: *const u8, len: libc::size_t) -> *mut public_or_secret_key {
|
||||
assert!(!raw.is_null());
|
||||
assert!(len > 0);
|
||||
@@ -58,6 +59,7 @@ pub unsafe extern "C" fn rpgp_key_from_bytes(
|
||||
}
|
||||
|
||||
/// Returns the KeyID for the passed in key. The caller is responsible to call [rpgp_string_drop] with the returned memory, to free it.
|
||||
#[allow(dead_code)]
|
||||
pub unsafe fn rpgp_key_id(key_ptr: *mut public_or_secret_key) -> *mut c_char {
|
||||
assert!(!key_ptr.is_null());
|
||||
|
||||
|
||||
@@ -211,6 +211,7 @@ pub unsafe fn rpgp_msg_drop(msg_ptr: *mut message) {
|
||||
}
|
||||
|
||||
/// Get the number of fingerprints of a given encrypted message.
|
||||
#[allow(dead_code)]
|
||||
pub unsafe fn rpgp_msg_recipients_len(msg_ptr: *mut message) -> u32 {
|
||||
assert!(!msg_ptr.is_null());
|
||||
|
||||
@@ -222,6 +223,7 @@ pub unsafe fn rpgp_msg_recipients_len(msg_ptr: *mut message) -> u32 {
|
||||
}
|
||||
|
||||
/// Get the fingerprint of a given encrypted message, by index, in hexformat.
|
||||
#[allow(dead_code)]
|
||||
pub unsafe fn rpgp_msg_recipients_get(msg_ptr: *mut message, i: u32) -> *mut c_char {
|
||||
assert!(!msg_ptr.is_null());
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ pub unsafe extern "C" fn rpgp_pkey_to_bytes(pkey_ptr: *mut signed_public_key) ->
|
||||
}
|
||||
|
||||
/// Get the key id of the given [signed_public_key].
|
||||
#[allow(dead_code)]
|
||||
pub unsafe fn rpgp_pkey_key_id(pkey_ptr: *mut signed_public_key) -> *mut c_char {
|
||||
assert!(!pkey_ptr.is_null());
|
||||
|
||||
|
||||
@@ -33,7 +33,8 @@ pub unsafe fn rpgp_create_rsa_skey(bits: u32, user_id: *const c_char) -> *mut si
|
||||
}
|
||||
|
||||
/// Generates a new x25519 key.
|
||||
pub unsafe extern "C" fn rpgp_create_x25519_skey(user_id: *const c_char) -> *mut signed_secret_key {
|
||||
#[allow(dead_code)]
|
||||
pub unsafe fn rpgp_create_x25519_skey(user_id: *const c_char) -> *mut signed_secret_key {
|
||||
assert!(!user_id.is_null());
|
||||
|
||||
let user_id = CStr::from_ptr(user_id);
|
||||
@@ -71,6 +72,7 @@ pub unsafe fn rpgp_skey_public_key(skey_ptr: *mut signed_secret_key) -> *mut sig
|
||||
}
|
||||
|
||||
/// Returns the KeyID for the passed in key.
|
||||
#[allow(dead_code)]
|
||||
pub unsafe fn rpgp_skey_key_id(skey_ptr: *mut signed_secret_key) -> *mut c_char {
|
||||
assert!(!skey_ptr.is_null());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user