mirror of
https://github.com/YGGverse/agate.git
synced 2026-04-09 04:55:27 +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 })
|
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 {
|
impl ResolvesServerCert for CertStore {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue