Skip to content

Commit

Permalink
ACME profiles initial support
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed Jan 9, 2025
1 parent 4d5c08f commit 3265401
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions acmeissuer.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ type ACMEIssuer struct {
// with this ACME account
ExternalAccount *acme.EAB

// Optionally select an ACME profile offered
// by the ACME server. The list of supported
// profile names can be obtained from the ACME
// server's directory endpoint. For details:
// https://datatracker.ietf.org/doc/draft-aaron-acme-profiles/
//
// (EXPERIMENTAL: Subject to change.)
Profile string

// Optionally specify the validity period of
// the certificate(s) here as offsets from the
// approximate time of certificate issuance,
Expand Down Expand Up @@ -450,6 +459,7 @@ func (am *ACMEIssuer) doIssue(ctx context.Context, csr *x509.CertificateRequest,
if am.NotAfter != 0 {
params.NotAfter = time.Now().Add(am.NotAfter)
}
params.Profile = am.Profile

// Notify the ACME server we are replacing a certificate (if the caller says we are),
// only if the following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/caddyserver/zerossl v0.1.3
github.com/klauspost/cpuid/v2 v2.2.9
github.com/libdns/libdns v0.2.2
github.com/mholt/acmez/v3 v3.0.0
github.com/mholt/acmez/v3 v3.0.1
github.com/miekg/dns v1.1.62
github.com/zeebo/blake3 v0.2.4
go.uber.org/zap v1.27.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kK
github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8=
github.com/libdns/libdns v0.2.2 h1:O6ws7bAfRPaBsgAYt8MDe2HcNBGC29hkZ9MX2eUSX3s=
github.com/libdns/libdns v0.2.2/go.mod h1:4Bj9+5CQiNMVGf87wjX4CY3HQJypUHRuLvlsfsZqLWQ=
github.com/mholt/acmez/v3 v3.0.0 h1:r1NcjuWR0VaKP2BTjDK9LRFBw/WvURx3jlaEUl9Ht8E=
github.com/mholt/acmez/v3 v3.0.0/go.mod h1:L1wOU06KKvq7tswuMDwKdcHeKpFFgkppZy/y0DFxagQ=
github.com/mholt/acmez/v3 v3.0.1 h1:4PcjKjaySlgXK857aTfDuRbmnM5gb3Ruz3tvoSJAUp8=
github.com/mholt/acmez/v3 v3.0.1/go.mod h1:L1wOU06KKvq7tswuMDwKdcHeKpFFgkppZy/y0DFxagQ=
github.com/miekg/dns v1.1.62 h1:cN8OuEF1/x5Rq6Np+h1epln8OiyPWV+lROx9LxcGgIQ=
github.com/miekg/dns v1.1.62/go.mod h1:mvDlcItzm+br7MToIKqkglaGhlFMHJ9DTNNWONWXbNQ=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down

0 comments on commit 3265401

Please sign in to comment.