mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 23:36:30 +03:00
remove unused parameter from load_or_generate_self_public_key()
This commit is contained in:
@@ -99,7 +99,7 @@ pub unsafe fn dc_e2ee_encrypt(
|
|||||||
|
|
||||||
if let Some(addr) = addr {
|
if let Some(addr) = addr {
|
||||||
if let Some(public_key) =
|
if let Some(public_key) =
|
||||||
load_or_generate_self_public_key(context, &addr, in_out_message)
|
load_or_generate_self_public_key(context, &addr)
|
||||||
{
|
{
|
||||||
/*only for random-seed*/
|
/*only for random-seed*/
|
||||||
if prefer_encrypt == EncryptPreference::Mutual || 0 != e2ee_guaranteed {
|
if prefer_encrypt == EncryptPreference::Mutual || 0 != e2ee_guaranteed {
|
||||||
@@ -481,7 +481,6 @@ unsafe fn new_data_part(
|
|||||||
unsafe fn load_or_generate_self_public_key(
|
unsafe fn load_or_generate_self_public_key(
|
||||||
context: &Context,
|
context: &Context,
|
||||||
self_addr: impl AsRef<str>,
|
self_addr: impl AsRef<str>,
|
||||||
_random_data_mime: *mut mailmime,
|
|
||||||
) -> Option<Key> {
|
) -> Option<Key> {
|
||||||
/* avoid double creation (we unlock the database during creation) */
|
/* avoid double creation (we unlock the database during creation) */
|
||||||
static mut S_IN_KEY_CREATION: libc::c_int = 0;
|
static mut S_IN_KEY_CREATION: libc::c_int = 0;
|
||||||
@@ -1065,7 +1064,7 @@ pub fn dc_ensure_secret_key_exists(context: &Context) -> Result<String> {
|
|||||||
"cannot ensure secret key if not configured."
|
"cannot ensure secret key if not configured."
|
||||||
)))?;
|
)))?;
|
||||||
unsafe {
|
unsafe {
|
||||||
load_or_generate_self_public_key(context, &self_addr, 0 as *mut mailmime)
|
load_or_generate_self_public_key(context, &self_addr)
|
||||||
.ok_or(format_err!("Failed to generate private key."))?;
|
.ok_or(format_err!("Failed to generate private key."))?;
|
||||||
}
|
}
|
||||||
Ok(self_addr)
|
Ok(self_addr)
|
||||||
|
|||||||
Reference in New Issue
Block a user