Browse Source

Merge pull request #11 from jpastuszek/wildcard_certs

support for wildcard certificates
pull/19/head
Rodolphe Bréard 5 years ago
committed by GitHub
parent
commit
550348009b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      acmed/src/certificate.rs

4
acmed/src/certificate.rs

@ -93,7 +93,9 @@ impl Certificate {
pub fn get_domain_challenge(&self, domain_name: &str) -> Result<Challenge, Error> {
let domain_name = domain_name.to_string();
for d in self.domains.iter() {
if d.dns == domain_name {
// strip wildcards from domain before matching
let base_domain = d.dns.trim_start_matches("*.");
if base_domain == domain_name {
let c = Challenge::from_str(&d.challenge)?;
return Ok(c);
}

Loading…
Cancel
Save