mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-03 23:22:23 -08:00
cmd/derper: use upstream golang.org/x/crypto/acme for IP certs
Upstream golang.org/x/crypto/acme gained issuance profile support in v0.59.0 (golang/go#73101), so cmd/derper no longer needs tailscale.com/tempfork/acme. Switch ipcert.go to upstream golang.org/x/crypto/acme using acme.WithOrderIssuanceProfile. Also switch from CreateOrderCert to CreateCertFromOrder so order finalization does not depend on the optional Location header in the finalize response. Updates #10238 Updates #22654 Change-Id: I28b4ed7f0af5e496fcc9e56ea9cd1112bbe19bb0 Signed-off-by: James Tucker <[email protected]>
This commit is contained in:
1 parent
865435c678
commit
b66743bb05
2 files changed
+3
-4
No files matched your search
@@ -127,7 +127,6 @@ tailscale.com/cmd/derper dependencies: (generated by github.com/tailscale/depawa
|
||||
tailscale.com/tailcfg from tailscale.com/client/local+
|
||||
tailscale.com/tailcfg/nodecap from tailscale.com/tailcfg+
|
||||
tailscale.com/tailcfg/peercap from tailscale.com/tailcfg+
|
||||
tailscale.com/tempfork/acme from tailscale.com/cmd/derper
|
||||
tailscale.com/tka from tailscale.com/client/local+
|
||||
tailscale.com/tsconst from tailscale.com/net/netmon+
|
||||
tailscale.com/tstime from tailscale.com/derp+
|
||||
|
||||
@@ -26,9 +26,9 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"golang.org/x/crypto/acme"
|
||||
"tailscale.com/atomicfile"
|
||||
"tailscale.com/tailcfg"
|
||||
"tailscale.com/tempfork/acme"
|
||||
)
|
||||
|
||||
// shortlivedProfile is the ACME certificate profile required by
|
||||
@@ -389,7 +389,7 @@ func (m *ipCertManager) obtainCert(ctx context.Context, ip netip.Addr) error {
|
||||
return fmt.Errorf("register: %w", err)
|
||||
}
|
||||
|
||||
order, err := m.client.AuthorizeOrder(ctx, acme.IPIDs(ipStr), acme.WithOrderProfile(shortlivedProfile))
|
||||
order, err := m.client.AuthorizeOrder(ctx, acme.IPIDs(ipStr), acme.WithOrderIssuanceProfile(shortlivedProfile))
|
||||
if err != nil {
|
||||
return fmt.Errorf("new order: %w", err)
|
||||
}
|
||||
@@ -413,7 +413,7 @@ func (m *ipCertManager) obtainCert(ctx context.Context, ip netip.Addr) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
der, _, err := m.client.CreateOrderCert(ctx, order.FinalizeURL, csr, true)
|
||||
der, _, err := m.client.CreateCertFromOrder(ctx, order, csr, true)
|
||||
if err != nil {
|
||||
return fmt.Errorf("finalizing order: %w", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user