mirror of
https://github.com/samsonjs/agate.git
synced 2026-03-25 09:05:50 +00:00
add function to check for cert of a domain
This commit is contained in:
parent
e6f70722de
commit
2934350485
1 changed files with 6 additions and 0 deletions
|
|
@ -206,6 +206,12 @@ impl CertStore {
|
|||
|
||||
Ok(Self { certs })
|
||||
}
|
||||
|
||||
/// Checks if a certificate fitting a specific domain has been loaded.
|
||||
/// The same rules about using a certificate at the level above apply.
|
||||
pub fn has_domain(&self, domain: &str) -> bool {
|
||||
self.certs.iter().any(|(s, _)| domain.ends_with(s))
|
||||
}
|
||||
}
|
||||
|
||||
impl ResolvesServerCert for CertStore {
|
||||
|
|
|
|||
Loading…
Reference in a new issue