mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-03 02:21:58 +00:00
Revert "types/key: add MachinePrivate and MachinePublic."
Broke the tailscale control plane due to surprise different serialization.
This reverts commit 4fdb88efe1.
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
||||
"time"
|
||||
|
||||
"inet.af/netaddr"
|
||||
"tailscale.com/types/key"
|
||||
"tailscale.com/types/wgkey"
|
||||
"tailscale.com/version"
|
||||
)
|
||||
@@ -214,7 +213,6 @@ func TestNodeEqual(t *testing.T) {
|
||||
return k.Public()
|
||||
}
|
||||
n1 := newPublicKey(t)
|
||||
m1 := key.NewMachine().Public()
|
||||
now := time.Now()
|
||||
|
||||
tests := []struct {
|
||||
@@ -292,13 +290,13 @@ func TestNodeEqual(t *testing.T) {
|
||||
true,
|
||||
},
|
||||
{
|
||||
&Node{Machine: m1},
|
||||
&Node{Machine: key.NewMachine().Public()},
|
||||
&Node{Machine: MachineKey(n1)},
|
||||
&Node{Machine: MachineKey(newPublicKey(t))},
|
||||
false,
|
||||
},
|
||||
{
|
||||
&Node{Machine: m1},
|
||||
&Node{Machine: m1},
|
||||
&Node{Machine: MachineKey(n1)},
|
||||
&Node{Machine: MachineKey(n1)},
|
||||
true,
|
||||
},
|
||||
{
|
||||
@@ -395,6 +393,14 @@ func TestNetInfoFields(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestMachineKeyMarshal(t *testing.T) {
|
||||
var k1, k2 MachineKey
|
||||
for i := range k1 {
|
||||
k1[i] = byte(i)
|
||||
}
|
||||
testKey(t, "mkey:", k1, &k2)
|
||||
}
|
||||
|
||||
func TestNodeKeyMarshal(t *testing.T) {
|
||||
var k1, k2 NodeKey
|
||||
for i := range k1 {
|
||||
|
||||
Reference in New Issue
Block a user