ipn/ipnlocal: strip NetworkLockKey from Prefs

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2022-11-19 00:23:57 +05:00
committed by Maisem Ali
parent f40bb199f5
commit f1ad26f694
2 changed files with 5 additions and 3 deletions

View File

@@ -973,20 +973,21 @@ func TestEditPrefsHasNoKeys(t *testing.T) {
t.Errorf("Hostname = %q; want foo", p.Hostname())
}
// Test that we can't see the PrivateNodeKey.
if !p.Persist().PrivateNodeKey.IsZero() {
t.Errorf("PrivateNodeKey = %v; want zero", p.Persist().PrivateNodeKey)
}
// Test that we can't see the PrivateNodeKey.
if !p.Persist().OldPrivateNodeKey.IsZero() {
t.Errorf("OldPrivateNodeKey = %v; want zero", p.Persist().OldPrivateNodeKey)
}
// Test that we can't see the PrivateNodeKey.
if !p.Persist().LegacyFrontendPrivateMachineKey.IsZero() {
t.Errorf("LegacyFrontendPrivateMachineKey = %v; want zero", p.Persist().LegacyFrontendPrivateMachineKey)
}
if !p.Persist().NetworkLockKey.IsZero() {
t.Errorf("NetworkLockKey= %v; want zero", p.Persist().NetworkLockKey)
}
}
type testStateStorage struct {