types/persist: use new node key type.

Updates #3206

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-10-28 09:50:58 -07:00
parent 5302e4be96
commit 0c546a28ba
8 changed files with 24 additions and 41 deletions

View File

@@ -21,7 +21,6 @@ import (
"tailscale.com/types/logger"
"tailscale.com/types/netmap"
"tailscale.com/types/persist"
"tailscale.com/types/wgkey"
"tailscale.com/wgengine"
)
@@ -122,7 +121,7 @@ func (cc *mockControl) populateKeys() (newKeys bool) {
if cc.persist.PrivateNodeKey.IsZero() {
cc.logf("Generating a new nodekey.")
cc.persist.OldPrivateNodeKey = cc.persist.PrivateNodeKey
cc.persist.PrivateNodeKey, _ = wgkey.NewPrivate()
cc.persist.PrivateNodeKey = key.NewNode()
newKeys = true
}