Fix private key generation code

This commit is contained in:
Ben Grabham 2022-03-01 18:21:08 +00:00
parent 02d49ded39
commit 3bf7eacc7e
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ func New(backend Backend, enc encapsulation.Encapsulator, granularity Granularit
private, err := wgtypes.ParseKey(string(privateB))
if err != nil {
level.Warn(logger).Log("msg", "no private key found on disk; generating one now")
if private, err = wgtypes.GenerateKey(); err != nil {
if private, err = wgtypes.GeneratePrivateKey(); err != nil {
return nil, err
}
}