wgengine: remove use of legacy key parsing helper.

Updates #3206

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-10-29 14:57:32 -07:00
parent 743293d473
commit ccd36cb5b1
2 changed files with 4 additions and 4 deletions

View File

@ -213,11 +213,11 @@ func nkFromHex(hex string) tailcfg.NodeKey {
if len(hex) != 64 {
panic(fmt.Sprintf("%q is len %d; want 64", hex, len(hex)))
}
k, err := key.NewPublicFromHexMem(mem.S(hex[:64]))
k, err := key.ParseNodePublicUntyped(mem.S(hex[:64]))
if err != nil {
panic(fmt.Sprintf("%q is not hex: %v", hex, err))
}
return tailcfg.NodeKey(k)
return tailcfg.NodeKeyFromNodePublic(k)
}
// an experiment to see if genLocalAddrFunc was worth it. As of Go