mirror of
https://github.com/chatmail/core.git
synced 2026-04-02 05:22:14 +03:00
rename dc_securejoin to securejoin.rs
This commit is contained in:
@@ -1324,7 +1324,7 @@ pub unsafe extern "C" fn dc_get_securejoin_qr(
|
||||
}
|
||||
|
||||
let context = &*context;
|
||||
dc_securejoin::dc_get_securejoin_qr(context, chat_id)
|
||||
securejoin::dc_get_securejoin_qr(context, chat_id)
|
||||
.unwrap_or("".to_string())
|
||||
.strdup()
|
||||
}
|
||||
@@ -1341,7 +1341,7 @@ pub unsafe extern "C" fn dc_join_securejoin(
|
||||
|
||||
let context = &*context;
|
||||
|
||||
dc_securejoin::dc_join_securejoin(context, as_str(qr))
|
||||
securejoin::dc_join_securejoin(context, as_str(qr))
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
||||
@@ -24,10 +24,10 @@ use deltachat::config;
|
||||
use deltachat::configure::*;
|
||||
use deltachat::constants::*;
|
||||
use deltachat::context::*;
|
||||
use deltachat::dc_securejoin::*;
|
||||
use deltachat::dc_tools::*;
|
||||
use deltachat::job::*;
|
||||
use deltachat::oauth2::*;
|
||||
use deltachat::securejoin::*;
|
||||
use deltachat::types::*;
|
||||
use deltachat::x::*;
|
||||
use rustyline::completion::{Completer, FilenameCompleter, Pair};
|
||||
|
||||
@@ -15,7 +15,6 @@ use crate::constants::*;
|
||||
use crate::contact::*;
|
||||
use crate::context::{do_heuristics_moves, Context};
|
||||
use crate::dc_mimeparser::*;
|
||||
use crate::dc_securejoin::*;
|
||||
use crate::dc_strencode::*;
|
||||
use crate::dc_tools::*;
|
||||
use crate::error::Result;
|
||||
@@ -24,6 +23,7 @@ use crate::location;
|
||||
use crate::message::*;
|
||||
use crate::param::*;
|
||||
use crate::peerstate::*;
|
||||
use crate::securejoin::handle_securejoin_handshake;
|
||||
use crate::sql;
|
||||
use crate::stock::StockMessage;
|
||||
use crate::types::*;
|
||||
@@ -400,7 +400,7 @@ unsafe fn add_parts(
|
||||
msgrmsg = 1;
|
||||
*chat_id = 0;
|
||||
allow_creation = 1;
|
||||
let handshake = dc_handle_securejoin_handshake(context, mime_parser, *from_id);
|
||||
let handshake = handle_securejoin_handshake(context, mime_parser, *from_id);
|
||||
if 0 != handshake & DC_HANDSHAKE_STOP_NORMAL_PROCESSING {
|
||||
*hidden = 1;
|
||||
*add_delete_job = handshake & DC_HANDSHAKE_ADD_DELETE_JOB;
|
||||
|
||||
@@ -23,13 +23,13 @@ use crate::aheader::*;
|
||||
use crate::config::Config;
|
||||
use crate::context::Context;
|
||||
use crate::dc_mimeparser::*;
|
||||
use crate::dc_securejoin::*;
|
||||
use crate::dc_tools::*;
|
||||
use crate::error::*;
|
||||
use crate::key::*;
|
||||
use crate::keyring::*;
|
||||
use crate::peerstate::*;
|
||||
use crate::pgp::*;
|
||||
use crate::securejoin::handle_degrade_event;
|
||||
use crate::types::*;
|
||||
use crate::x::*;
|
||||
|
||||
@@ -440,7 +440,7 @@ impl E2eeHelper {
|
||||
}
|
||||
if let Some(ref peerstate) = peerstate {
|
||||
if peerstate.degrade_event.is_some() {
|
||||
dc_handle_degrade_event(context, &peerstate);
|
||||
handle_degrade_event(context, &peerstate);
|
||||
}
|
||||
if let Some(ref key) = peerstate.gossip_key {
|
||||
public_keyring_for_validate.add_ref(key);
|
||||
@@ -681,7 +681,7 @@ unsafe fn update_gossip_peerstates(
|
||||
}
|
||||
if let Some(peerstate) = peerstate {
|
||||
if peerstate.degrade_event.is_some() {
|
||||
dc_handle_degrade_event(context, &peerstate);
|
||||
handle_degrade_event(context, &peerstate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,11 +57,11 @@ mod dc_loginparam;
|
||||
mod dc_mimefactory;
|
||||
pub mod dc_mimeparser;
|
||||
pub mod dc_receive_imf;
|
||||
pub mod dc_securejoin;
|
||||
mod dc_simplify;
|
||||
mod dc_strencode;
|
||||
mod dc_token;
|
||||
pub mod dc_tools;
|
||||
pub mod securejoin;
|
||||
|
||||
#[cfg(test)]
|
||||
mod test_utils;
|
||||
|
||||
@@ -341,7 +341,7 @@ fn fingerprint_equals_sender(
|
||||
}
|
||||
|
||||
/* library private: secure-join */
|
||||
pub fn dc_handle_securejoin_handshake(
|
||||
pub fn handle_securejoin_handshake(
|
||||
context: &Context,
|
||||
mimeparser: &dc_mimeparser_t,
|
||||
contact_id: uint32_t,
|
||||
@@ -748,7 +748,7 @@ fn encrypted_and_signed(
|
||||
}
|
||||
}
|
||||
|
||||
pub fn dc_handle_degrade_event(context: &Context, peerstate: &Peerstate) {
|
||||
pub fn handle_degrade_event(context: &Context, peerstate: &Peerstate) {
|
||||
// - we do not issue an warning for DC_DE_ENCRYPTION_PAUSED as this is quite normal
|
||||
// - currently, we do not issue an extra warning for DC_DE_VERIFICATION_LOST - this always comes
|
||||
// together with DC_DE_FINGERPRINT_CHANGED which is logged, the idea is not to bother
|
||||
Reference in New Issue
Block a user