diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-03-05 20:33:51 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-03-05 20:33:51 +0100 |
commit | 5d4dae5e18daa63095fbbe81004bfa974b688920 (patch) | |
tree | 14faa93d123ab92f2af5c143b1f13fe8176fb487 /conf | |
parent | conf: validate tunnel name (diff) | |
download | wireguard-windows-5d4dae5e18daa63095fbbe81004bfa974b688920.tar.xz wireguard-windows-5d4dae5e18daa63095fbbe81004bfa974b688920.zip |
conf: expose base64 key parsing
Diffstat (limited to 'conf')
-rw-r--r-- | conf/config.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/conf/config.go b/conf/config.go index d802ec61..80c5a7e3 100644 --- a/conf/config.go +++ b/conf/config.go @@ -128,6 +128,10 @@ func NewPrivateKey() (*Key, error) { return k, nil } +func NewPrivateKeyFromString(b64 string) (*Key, error) { + return parseKeyBase64(b64) +} + func formatInterval(i int64, n string, l int) string { r := "" if l > 0 { |