tailcfg: remove use of wgkey.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson 2021-10-28 10:39:56 -07:00
parent 3164c7410e
commit bab2d92c42

View File

@ -14,7 +14,6 @@
"inet.af/netaddr"
"tailscale.com/types/key"
"tailscale.com/types/wgkey"
"tailscale.com/version"
)
@ -205,15 +204,7 @@ func TestNodeEqual(t *testing.T) {
have, nodeHandles)
}
newPublicKey := func(t *testing.T) wgkey.Key {
t.Helper()
k, err := wgkey.NewPrivate()
if err != nil {
t.Fatal(err)
}
return k.Public()
}
n1 := newPublicKey(t)
n1 := key.NewNode().Public()
m1 := key.NewMachine().Public()
now := time.Now()
@ -272,13 +263,13 @@ func TestNodeEqual(t *testing.T) {
true,
},
{
&Node{Key: NodeKey(n1)},
&Node{Key: NodeKey(newPublicKey(t))},
&Node{Key: NodeKeyFromNodePublic(n1)},
&Node{Key: NodeKeyFromNodePublic(key.NewNode().Public())},
false,
},
{
&Node{Key: NodeKey(n1)},
&Node{Key: NodeKey(n1)},
&Node{Key: NodeKeyFromNodePublic(n1)},
&Node{Key: NodeKeyFromNodePublic(n1)},
true,
},
{