mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-14 15:07:55 +00:00
cmd/derper, net/tlsdial: fix client's self-signed cert validation
This fixes the implementation and test from #15208 which apparently never worked. Ignore the metacert when counting the number of expected certs presented. And fix the test, pulling out the TLSConfig setup code into something shared between the real cmd/derper and the test. Fixes #15579 Change-Id: I90526e38e59f89b480629b415f00587b107de10a Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
b5770c81c9
commit
8009ad74a3
11
derp/derpconst/derpconst.go
Normal file
11
derp/derpconst/derpconst.go
Normal file
@@ -0,0 +1,11 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Package derpconst contains constants used by the DERP client and server.
|
||||
package derpconst
|
||||
|
||||
// MetaCertCommonNamePrefix is the prefix that the DERP server
|
||||
// puts on for the common name of its "metacert". The suffix of
|
||||
// the common name after "derpkey" is the hex key.NodePublic
|
||||
// of the DERP server.
|
||||
const MetaCertCommonNamePrefix = "derpkey"
|
Reference in New Issue
Block a user