mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-23 17:16:29 +00:00
types/netmap: remove PrivateKey from NetworkMap
It's an unnecessary nuisance having it. We go out of our way to redact it in so many places when we don't even need it there anyway. Updates #12639 Change-Id: I5fc72e19e9cf36caeb42cf80ba430873f67167c3 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
98aadbaf54
commit
653d0738f9
@@ -10,9 +10,12 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"reflect"
|
||||
"slices"
|
||||
|
||||
"go4.org/mem"
|
||||
"tailscale.com/util/set"
|
||||
"tailscale.com/util/testenv"
|
||||
)
|
||||
|
||||
// rand fills b with cryptographically strong random bytes. Panics if
|
||||
@@ -115,3 +118,18 @@ func debug32(k [32]byte) string {
|
||||
dst[6] = ']'
|
||||
return string(dst[:7])
|
||||
}
|
||||
|
||||
// PrivateTypesForTest returns the set of private key types
|
||||
// in this package, for testing purposes.
|
||||
func PrivateTypesForTest() set.Set[reflect.Type] {
|
||||
testenv.AssertInTest()
|
||||
return set.Of(
|
||||
reflect.TypeFor[ChallengePrivate](),
|
||||
reflect.TypeFor[ControlPrivate](),
|
||||
reflect.TypeFor[DiscoPrivate](),
|
||||
reflect.TypeFor[MachinePrivate](),
|
||||
reflect.TypeFor[NodePrivate](),
|
||||
reflect.TypeFor[NLPrivate](),
|
||||
reflect.TypeFor[HardwareAttestationKey](),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user