Skip to content

Commit

Permalink
ensure proper removal of certificate in CertificateResolver
Browse files Browse the repository at this point in the history
  • Loading branch information
Keksoj committed Feb 13, 2024
1 parent 08ed6d4 commit a732674
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/src/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,11 @@ impl CertificateResolver {
if let Some(fingerprints) = self.name_fingerprint_idx.get_mut(&name) {
fingerprints.remove(fingerprint);

if fingerprints.is_empty() {
self.domains.domain_remove(&name.into_bytes());
self.domains.domain_remove(&name.clone().into_bytes());

if let Some(fingerprint) = fingerprints.iter().next() {
self.domains
.insert(name.into_bytes(), fingerprint.to_owned());
}
}
}
Expand Down

0 comments on commit a732674

Please sign in to comment.