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
|
|
@ -47,19 +47,6 @@ impl Identity {
|
|||
gemini,
|
||||
})
|
||||
}
|
||||
|
||||
/// Get `pem` record match `request`
|
||||
/// * [Client certificates specification](https://geminiprotocol.net/docs/protocol-specification.gmi#client-certificates)
|
||||
/// * this function work with memory cache collected (not database)
|
||||
pub fn gemini(&self, request: &str) -> Option<String> {
|
||||
if let Some(id) = self.gemini.auth.memory.match_priority(request) {
|
||||
match self.gemini.memory.get(id) {
|
||||
Ok(pem) => return Some(pem),
|
||||
Err(reason) => todo!("{:?}", reason.to_string()),
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
// Tools
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue