aboutsummaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-03-04 22:55:17 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-03-04 22:57:38 +0100
commit2072ee874d2c123ab586f1fc115bcc58ae6427be (patch)
treecc486ecfc34049d0506e8e9f5c0ade06cea624fe /conf
parentifaceconfig: cleanup (diff)
downloadwireguard-windows-2072ee874d2c123ab586f1fc115bcc58ae6427be.tar.xz
wireguard-windows-2072ee874d2c123ab586f1fc115bcc58ae6427be.zip
conf: uapi returns hex, not base64
Diffstat (limited to 'conf')
-rw-r--r--conf/parser.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/conf/parser.go b/conf/parser.go
index 48cf88b6..3b2ae1b3 100644
--- a/conf/parser.go
+++ b/conf/parser.go
@@ -370,7 +370,7 @@ func FromUAPI(s string, existingConfig *Config) (*Config, error) {
if parserState == inInterfaceSection {
switch key {
case "private_key":
- k, err := parseKeyBase64(val)
+ k, err := parseKeyHex(val)
if err != nil {
return nil, err
}
@@ -390,13 +390,13 @@ func FromUAPI(s string, existingConfig *Config) (*Config, error) {
} else if parserState == inPeerSection {
switch key {
case "public_key":
- k, err := parseKeyBase64(val)
+ k, err := parseKeyHex(val)
if err != nil {
return nil, err
}
peer.PublicKey = *k
case "preshared_key":
- k, err := parseKeyBase64(val)
+ k, err := parseKeyHex(val)
if err != nil {
return nil, err
}