mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
wgengine/wgcfg: remove unused helper function.
Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
parent
0c546a28ba
commit
3164c7410e
@ -6,7 +6,6 @@
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
@ -16,7 +15,6 @@
|
||||
"go4.org/mem"
|
||||
"inet.af/netaddr"
|
||||
"tailscale.com/types/key"
|
||||
"tailscale.com/types/wgkey"
|
||||
)
|
||||
|
||||
type ParseError struct {
|
||||
@ -118,17 +116,6 @@ func FromUAPI(r io.Reader) (*Config, error) {
|
||||
return cfg, nil
|
||||
}
|
||||
|
||||
func parseKeyHex(s []byte, dst []byte) error {
|
||||
n, err := hex.Decode(dst, s)
|
||||
if err != nil {
|
||||
return &ParseError{"Invalid key: " + err.Error(), string(s)}
|
||||
}
|
||||
if n != wgkey.Size {
|
||||
return &ParseError{"Keys must decode to exactly 32 bytes", string(s)}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (cfg *Config) handleDeviceLine(k, value mem.RO, valueBytes []byte) error {
|
||||
switch {
|
||||
case k.EqualString("private_key"):
|
||||
|
Loading…
Reference in New Issue
Block a user