mirror of
https://github.com/tailscale/tailscale.git
synced 2025-11-15 10:13:18 +00:00
wgengine/magicsock: cache precomputed nacl/box shared keys
Updates #483
This commit is contained in:
@@ -841,12 +841,11 @@ func TestDiscoMessage(t *testing.T) {
|
||||
peer1Priv := key.NewPrivate()
|
||||
peer1Pub := peer1Priv.Public()
|
||||
|
||||
c := &Conn{
|
||||
logf: t.Logf,
|
||||
discoPrivate: key.NewPrivate(),
|
||||
nodeOfDisco: map[tailcfg.DiscoKey]*tailcfg.Node{
|
||||
tailcfg.DiscoKey(peer1Pub): &tailcfg.Node{Key: tailcfg.NodeKey{1: 1}},
|
||||
},
|
||||
c := newConn()
|
||||
c.logf = t.Logf
|
||||
c.SetDiscoPrivateKey(key.NewPrivate())
|
||||
c.nodeOfDisco = map[tailcfg.DiscoKey]*tailcfg.Node{
|
||||
tailcfg.DiscoKey(peer1Pub): &tailcfg.Node{Key: tailcfg.NodeKey{1: 1}},
|
||||
}
|
||||
|
||||
const payload = "why hello"
|
||||
|
||||
Reference in New Issue
Block a user