You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/ipn/localapi
Andrew Lytvynov c1ecae13ab
ipn/{ipnlocal,localapi}: actually renew certs before expiry (#8731)
While our `shouldStartDomainRenewal` check is correct, `getCertPEM`
would always bail if the existing cert is not expired. Add the same
`shouldStartDomainRenewal` check to `getCertPEM` to make it proceed with
renewal when existing certs are still valid but should be renewed.

The extra check is expensive (ARI request towards LetsEncrypt), so cache
the last check result for 1hr to not degrade `tailscale serve`
performance.

Also, asynchronous renewal is great for `tailscale serve` but confusing
for `tailscale cert`. Add an explicit flag to `GetCertPEM` to force a
synchronous renewal for `tailscale cert`.

Fixes #8725

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2 years ago
..
cert.go ipn/{ipnlocal,localapi}: actually renew certs before expiry (#8731) 2 years ago
debugderp.go all: avoid repeated default interface lookups 3 years ago
disabled_stubs.go all: update copyright and license headers 3 years ago
localapi.go tailcfg,ipn/ipnlocal,wgengine: add values to PeerCapabilities 2 years ago
localapi_test.go all: use tstest.Replace more 3 years ago
pprof.go all: update copyright and license headers 3 years ago