diff options
author | Matt Holt <[email protected]> | 2024-04-13 21:31:43 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2024-04-13 21:31:43 -0400 |
commit | 81413caea251a3ef9e3641d7b1b6e867572a2b1b (patch) | |
tree | 1a379dcf516e8d7daeae1fb00e54c1fbf1e74696 /modules/caddyhttp | |
parent | dc9dd2e4b3e266cb1267f672e3bcfd50c67cc3d4 (diff) | |
download | caddy-81413caea251a3ef9e3641d7b1b6e867572a2b1b.tar.gz caddy-81413caea251a3ef9e3641d7b1b6e867572a2b1b.zip |
caddytls: Upgrade ACMEz to v2; support ZeroSSL API; various fixes (#6229)
* WIP: acmez v2, CertMagic, and ZeroSSL issuer upgrades
* caddytls: ZeroSSLIssuer now uses ZeroSSL API instead of ACME
* Fix go.mod
* caddytls: Fix automation related to managers (fix #6060)
* Fix typo (appease linter)
* Fix HTTP validation with ZeroSSL API
Diffstat (limited to 'modules/caddyhttp')
-rw-r--r-- | modules/caddyhttp/autohttps.go | 10 | ||||
-rw-r--r-- | modules/caddyhttp/reverseproxy/fastcgi/client_test.go | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/modules/caddyhttp/autohttps.go b/modules/caddyhttp/autohttps.go index e28062f05..54a2d9ccd 100644 --- a/modules/caddyhttp/autohttps.go +++ b/modules/caddyhttp/autohttps.go @@ -287,6 +287,16 @@ uniqueDomainsLoop: for _, ap := range app.tlsApp.Automation.Policies { for _, apHost := range ap.Subjects() { if apHost == d { + // if the automation policy has all internal subjects but no issuers, + // it will default to CertMagic's issuers which are public CAs; use + // our internal issuer instead + if len(ap.Issuers) == 0 && ap.AllInternalSubjects() { + iss := new(caddytls.InternalIssuer) + if err := iss.Provision(ctx); err != nil { + return err + } + ap.Issuers = append(ap.Issuers, iss) + } continue uniqueDomainsLoop } } diff --git a/modules/caddyhttp/reverseproxy/fastcgi/client_test.go b/modules/caddyhttp/reverseproxy/fastcgi/client_test.go index a2227a653..14a1cf684 100644 --- a/modules/caddyhttp/reverseproxy/fastcgi/client_test.go +++ b/modules/caddyhttp/reverseproxy/fastcgi/client_test.go @@ -213,8 +213,6 @@ func DisabledTest(t *testing.T) { // TODO: test chunked reader globalt = t - rand.Seed(time.Now().UTC().UnixNano()) - // server go func() { listener, err := net.Listen("tcp", ipPort) |