aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSteven Honson <steven@honson.id.au>2019-05-08 22:29:44 +1000
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-08 14:51:08 +0200
commit17141b07d1b6678078cdde07f9079691515d9449 (patch)
tree4d495233162b66709e6fedca299b5534b22ac582
parentui: get correctly sized system icons (diff)
downloadwireguard-windows-17141b07d1b6678078cdde07f9079691515d9449.tar.xz
wireguard-windows-17141b07d1b6678078cdde07f9079691515d9449.zip
conf: read presharedkey as a hexstring when converting to uapi
Signed-off-by: Steven Honson <steven@honson.id.au>
-rw-r--r--conf/writer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/conf/writer.go b/conf/writer.go
index d9504178..ccc3024b 100644
--- a/conf/writer.go
+++ b/conf/writer.go
@@ -84,7 +84,7 @@ func (conf *Config) ToUAPI() (uapi string, dnsErr error) {
output.WriteString(fmt.Sprintf("public_key=%s\n", peer.PublicKey.HexString()))
if !peer.PresharedKey.IsZero() {
- output.WriteString(fmt.Sprintf("preshared_key = %s\n", peer.PresharedKey.String()))
+ output.WriteString(fmt.Sprintf("preshared_key=%s\n", peer.PresharedKey.HexString()))
}
if !peer.Endpoint.IsEmpty() {