mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +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));
|
.set_status_text(t!("sigchat.status.probing", locales::LANG));
|
||||||
self.chat.set_busy_state(true);
|
self.chat.set_busy_state(true);
|
||||||
let tls = Tls::new();
|
let tls = Tls::new();
|
||||||
match tls.probe(host) {
|
if tls.accessible(host, true) {
|
||||||
Ok(certs) => {
|
self.chat.set_busy_state(false);
|
||||||
if certs.len() == 0 {
|
true
|
||||||
self.modals
|
} else {
|
||||||
.show_notification(t!("sigchat.account.abort", locales::LANG), None)
|
self.modals
|
||||||
.expect("abort failed");
|
.show_notification(t!("sigchat.account.abort", locales::LANG), None)
|
||||||
self.chat.set_busy_state(false);
|
.expect("abort failed");
|
||||||
false
|
self.chat.set_busy_state(false);
|
||||||
} else {
|
false
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue