mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
delegate certificate init to ggemini wrapper, add structs for some, tuple entities, move match_priority to gemini impl area
This commit is contained in:
parent
36f07aa773
commit
053c078e11
6 changed files with 53 additions and 29 deletions
|
|
@ -23,7 +23,7 @@ use crate::Profile;
|
|||
use gtk::{
|
||||
gdk::Texture,
|
||||
gdk_pixbuf::Pixbuf,
|
||||
gio::{Cancellable, SocketClientEvent, TlsCertificate},
|
||||
gio::{Cancellable, SocketClientEvent},
|
||||
glib::{
|
||||
gformat, GString, Priority, Regex, RegexCompileFlags, RegexMatchFlags, Uri, UriFlags,
|
||||
UriHideFlags,
|
||||
|
|
@ -417,17 +417,19 @@ impl Page {
|
|||
let input = self.input.clone();
|
||||
let meta = self.meta.clone();
|
||||
|
||||
// Return PEM string match request
|
||||
// Find identity match request
|
||||
let certificate = match self
|
||||
.profile
|
||||
.identity
|
||||
.gemini(&self.navigation.request().widget().gobject().text())
|
||||
.gemini
|
||||
.match_priority(&self.navigation.request().widget().gobject().text())
|
||||
{
|
||||
// @TODO delegate to client
|
||||
Some(pem) => match TlsCertificate::from_pem(&pem) {
|
||||
Ok(certificate) => Some(certificate),
|
||||
Err(reason) => todo!("{reason}"),
|
||||
},
|
||||
Some(identity) => {
|
||||
match gemini::client::Certificate::from_pem(&identity.pem, &identity.scope) {
|
||||
Ok(certificate) => Some(certificate),
|
||||
Err(reason) => todo!("{reason}"),
|
||||
}
|
||||
}
|
||||
None => None,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue