tailcfg: remove use of wgkey.
"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,
},
{
