prober: expand certificate verification logic in the TLS prober

TLS prober now checks validity period for all server certificates
and verifies OCSP revocation status for the leaf cert.

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
This commit is contained in:
Anton Tolchanov
2022-10-12 18:41:38 +01:00
committed by Anton Tolchanov
parent 39d03b6b63
commit 26af329fde
4 changed files with 351 additions and 21 deletions

View File

@@ -18,8 +18,7 @@ const maxHTTPBody = 4 << 20 // MiB
//
// The ProbeFunc sends a GET request for url, expects an HTTP 200
// response, and verifies that want is present in the response
// body. If the URL is HTTPS, the probe further checks that the TLS
// certificate is good for at least the next 7 days.
// body.
func HTTP(url, wantText string) ProbeFunc {
return func(ctx context.Context) error {
return probeHTTP(ctx, url, []byte(wantText))