mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-24 22:06:57 +00:00
use self-signed cert instead of TLS-ALPN-01 when DNS not defined
This commit is contained in:
parent
62bff5d1b7
commit
8ba71e4d59
3 changed files with 11 additions and 19 deletions
|
@ -236,7 +236,15 @@ func (c *AcmeClient) obtainCert(acmeClient *lego.Client, domains []string, renew
|
|||
defer c.obtainLocks.Delete(name)
|
||||
|
||||
if acmeClient == nil {
|
||||
return mockCert(domains[0], "ACME client uninitialized. This is a server error, please report!", mainDomainSuffix, keyDatabase)
|
||||
if useDnsProvider {
|
||||
mock_domain := domains[0]
|
||||
if name == mainDomainSuffix {
|
||||
mock_domain = "*" + mainDomainSuffix
|
||||
}
|
||||
return mockCert(mock_domain, "DNS ACME client is not defined", mainDomainSuffix, keyDatabase)
|
||||
} else {
|
||||
return mockCert(domains[0], "ACME client uninitialized. This is a server error, please report!", mainDomainSuffix, keyDatabase)
|
||||
}
|
||||
}
|
||||
|
||||
// request actual cert
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue