mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
re-implement Sigchat.probe_host() using Tls.accessible()
now the user is only presented with the tls trust_modal when none of the required CA's are trusted
This commit is contained in:
parent
5703707cca
commit
5e1c6f6276
1 changed files with 9 additions and 20 deletions
|
|
@ -177,26 +177,15 @@ impl<'a> SigChat<'a> {
|
|||
.set_status_text(t!("sigchat.status.probing", locales::LANG));
|
||||
self.chat.set_busy_state(true);
|
||||
let tls = Tls::new();
|
||||
match tls.probe(host) {
|
||||
Ok(certs) => {
|
||||
if certs.len() == 0 {
|
||||
self.modals
|
||||
.show_notification(t!("sigchat.account.abort", locales::LANG), None)
|
||||
.expect("abort failed");
|
||||
self.chat.set_busy_state(false);
|
||||
false
|
||||
} else {
|
||||
self.chat.set_busy_state(false);
|
||||
true
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
self.chat.set_busy_state(false);
|
||||
self.modals
|
||||
.show_notification(&format!("{}", e), None)
|
||||
.expect("qrcode failed");
|
||||
false
|
||||
}
|
||||
if tls.accessible(host, true) {
|
||||
self.chat.set_busy_state(false);
|
||||
true
|
||||
} else {
|
||||
self.modals
|
||||
.show_notification(t!("sigchat.account.abort", locales::LANG), None)
|
||||
.expect("abort failed");
|
||||
self.chat.set_busy_state(false);
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue