feat: add handling of tls cert for delegated hosts
This commit is contained in:
parent
18398e1f17
commit
0b56589dce
5 changed files with 82 additions and 128 deletions
|
@ -74,6 +74,16 @@ where
|
|||
.write()
|
||||
.unwrap()
|
||||
.insert(Box::<ServerName>::from(destination), result.clone());
|
||||
let actual_destination = result.0.strip_prefix("https://").unwrap().splitn(2, ':').next().unwrap();
|
||||
let host = result.1.splitn(2, ':').next().unwrap_or(&result.1);
|
||||
if actual_destination != host {
|
||||
globals.tls_name_override.write().unwrap().insert(
|
||||
actual_destination.to_owned(),
|
||||
webpki::DNSNameRef::try_from_ascii_str(&host)
|
||||
.unwrap()
|
||||
.to_owned(),
|
||||
);
|
||||
}
|
||||
result
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue