aboutsummaryrefslogtreecommitdiff
path: root/wgcfg/parser.go
diff options
context:
space:
mode:
Diffstat (limited to 'wgcfg/parser.go')
-rw-r--r--wgcfg/parser.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/wgcfg/parser.go b/wgcfg/parser.go
index e71d32b..8db18f3 100644
--- a/wgcfg/parser.go
+++ b/wgcfg/parser.go
@@ -100,7 +100,7 @@ func parsePersistentKeepalive(s string) (uint16, error) {
return uint16(m), nil
}
-func parseKeyHex(s string) (*Key, error) {
+func parseKeyHex(s string) (*PublicKey, error) {
k, err := hex.DecodeString(s)
if err != nil {
return nil, &ParseError{"Invalid key: " + err.Error(), s}
@@ -108,7 +108,7 @@ func parseKeyHex(s string) (*Key, error) {
if len(k) != KeySize {
return nil, &ParseError{"Keys must decode to exactly 32 bytes", s}
}
- var key Key
+ var key PublicKey
copy(key[:], k)
return &key, nil
}