delegate certificate init to ggemini wrapper, add structs for some, tuple entities, move match_priority to gemini impl area

This commit is contained in:
yggverse 2024-11-27 21:40:44 +02:00
parent 36f07aa773
commit 053c078e11
6 changed files with 53 additions and 29 deletions

View file

@ -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