more flag documentation

This commit is contained in:
6543 2023-02-13 20:33:55 +01:00
parent f06d615d43
commit e2a84390df
No known key found for this signature in database
GPG key ID: B8BE6D610E61C862
2 changed files with 14 additions and 7 deletions

View file

@ -43,6 +43,11 @@ func createAcmeClient(ctx *cli.Context, enableHTTPServer bool, challengeCache ca
if (!acmeAcceptTerms || dnsProvider == "") && acmeAPI != "https://acme.mock.directory" {
return nil, fmt.Errorf("%w: you must set $ACME_ACCEPT_TERMS and $DNS_PROVIDER, unless $ACME_API is set to https://acme.mock.directory", ErrAcmeMissConfig)
}
if len(acmeEabHmac) != 0 && len(acmeEabKID) == 0 {
return nil, fmt.Errorf("%w: ACME_EAB_HMAC also needs ACME_EAB_KID to be set", ErrAcmeMissConfig)
} else if len(acmeEabHmac) == 0 && len(acmeEabKID) != 0 {
return nil, fmt.Errorf("%w: ACME_EAB_KID also needs ACME_EAB_HMAC to be set", ErrAcmeMissConfig)
}
return certificates.NewAcmeClient(
acmeAccountConf,