Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 12, 03:15 UTC
caddytls: Initial support for ACME profiles
Still very experimental; only deployed to LE staging so far.
Matthew Holt committed
Jan 9, 2025 at 13:57 UTC
2c4295ee48f494bc8dda5fa09b37612d520c8b3b
3 files changed
+21
-6
go.mod
+2
-2
@@ -9,7 +9,7 @@ require (
9
github.com/Masterminds/sprig/v3 v3.3.0
10
github.com/alecthomas/chroma/v2 v2.14.0
11
github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b
12
- github.com/caddyserver/certmagic v0.21.6
12
+ github.com/caddyserver/certmagic v0.21.7-0.20250109205135-32654015b016
13
github.com/caddyserver/zerossl v0.1.3
14
github.com/dustin/go-humanize v1.0.1
15
github.com/go-chi/chi/v5 v5.0.12
@@ -17,7 +17,7 @@ require (
17
github.com/google/uuid v1.6.0
18
github.com/klauspost/compress v1.17.11
19
github.com/klauspost/cpuid/v2 v2.2.9
20
- github.com/mholt/acmez/v3 v3.0.0
20
+ github.com/mholt/acmez/v3 v3.0.1
21
github.com/prometheus/client_golang v1.19.1
22
github.com/quic-go/quic-go v0.48.2
23
github.com/smallstep/certificates v0.26.1
go.sum
+4
-4
@@ -89,8 +89,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
89
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
90
github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=
91
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
92
-github.com/caddyserver/certmagic v0.21.6 h1:1th6GfprVfsAtFNOu4StNMF5IxK5XiaI0yZhAHlZFPE=
93
-github.com/caddyserver/certmagic v0.21.6/go.mod h1:n1sCo7zV1Ez2j+89wrzDxo4N/T1Ws/Vx8u5NvuBFabw=
92
+github.com/caddyserver/certmagic v0.21.7-0.20250109205135-32654015b016 h1:bwnFMkCXIgw3WO7vvMwpr7Zf8qfADmMzYe6mxSKC7zI=
93
+github.com/caddyserver/certmagic v0.21.7-0.20250109205135-32654015b016/go.mod h1:LCPG3WLxcnjVKl/xpjzM0gqh0knrKKKiO5WVttX2eEI=
94
github.com/caddyserver/zerossl v0.1.3 h1:onS+pxp3M8HnHpN5MMbOMyNjmTheJyWRaZYwn+YTAyA=
95
github.com/caddyserver/zerossl v0.1.3/go.mod h1:CxA0acn7oEGO6//4rtrRjYgEoa4MFw/XofZnrYwGqG4=
96
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
@@ -344,8 +344,8 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D
344
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
345
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI=
346
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
347
-github.com/mholt/acmez/v3 v3.0.0 h1:r1NcjuWR0VaKP2BTjDK9LRFBw/WvURx3jlaEUl9Ht8E=
348
-github.com/mholt/acmez/v3 v3.0.0/go.mod h1:L1wOU06KKvq7tswuMDwKdcHeKpFFgkppZy/y0DFxagQ=
347
+github.com/mholt/acmez/v3 v3.0.1 h1:4PcjKjaySlgXK857aTfDuRbmnM5gb3Ruz3tvoSJAUp8=
348
+github.com/mholt/acmez/v3 v3.0.1/go.mod h1:L1wOU06KKvq7tswuMDwKdcHeKpFFgkppZy/y0DFxagQ=
349
github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=
350
github.com/miekg/dns v1.1.62 h1:cN8OuEF1/x5Rq6Np+h1epln8OiyPWV+lROx9LxcGgIQ=
351
github.com/miekg/dns v1.1.62/go.mod h1:mvDlcItzm+br7MToIKqkglaGhlFMHJ9DTNNWONWXbNQ=
modules/caddytls/acmeissuer.go
+15
@@ -60,6 +60,14 @@ type ACMEIssuer struct {
60
// other than ACME transactions.
61
Email string `json:"email,omitempty"`
62
63
+ // Optionally select an ACME profile to use for certificate
64
+ // orders. Must be a profile name offered by the ACME server,
65
+ // which are listed at its directory endpoint.
66
+ //
67
+ // EXPERIMENTAL: Subject to change.
68
+ // See https://datatracker.ietf.org/doc/draft-aaron-acme-profiles/
69
+ Profile string `json:"profile,omitempty"`
70
+
71
// If you have an existing account with the ACME server, put
72
// the private key here in PEM format. The ACME client will
73
// look up your account information with this key first before
@@ -184,6 +192,7 @@ func (iss *ACMEIssuer) makeIssuerTemplate() (certmagic.ACMEIssuer, error) {
192
CA: iss.CA,
193
TestCA: iss.TestCA,
194
Email: iss.Email,
195
+ Profile: iss.Profile,
196
AccountKeyPEM: iss.AccountKey,
197
CertObtainTimeout: time.Duration(iss.ACMETimeout),
198
TrustedRoots: iss.rootPool,
@@ -338,6 +347,7 @@ func (iss *ACMEIssuer) generateZeroSSLEABCredentials(ctx context.Context, acct a
347
// dir <directory_url>
348
// test_dir <test_directory_url>
349
// email <email>
350
+// profile <profile_name>
351
// timeout <duration>
352
// disable_http_challenge
353
// disable_tlsalpn_challenge
@@ -400,6 +410,11 @@ func (iss *ACMEIssuer) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
410
return d.ArgErr()
411
}
412
413
+ case "profile":
414
+ if !d.AllArgs(&iss.Profile) {
415
+ return d.ArgErr()
416
+ }
417
+
418
case "timeout":
419
var timeoutStr string
420
if !d.AllArgs(&timeoutStr) {