mirror of
https://github.com/YGGverse/agate.git
synced 2026-04-08 12:35:28 +00:00
implement default cert fallback (SNI-less IP as host support)
This commit is contained in:
parent
1b7408d2d3
commit
aa799a482e
1 changed files with 7 additions and 2 deletions
|
|
@ -222,8 +222,13 @@ impl ResolvesServerCert for CertStore {
|
||||||
.map(|(_, k)| k)
|
.map(|(_, k)| k)
|
||||||
.cloned()
|
.cloned()
|
||||||
} else {
|
} else {
|
||||||
// This kind of resolver requires SNI.
|
// This kind of resolver requires SNI. Fallback to default cert.
|
||||||
None
|
// * must exist in the `.certificates` root
|
||||||
|
// * CN value can be any
|
||||||
|
self.certs
|
||||||
|
.iter()
|
||||||
|
.find(|(domain, _)| domain.is_empty())
|
||||||
|
.map(|(_, key)| Arc::clone(key))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue