Merge pull request #279 from SerialVelocity/fix-private-key-generation

Fix private key generation code
This commit is contained in:
Lucas Servén Marín 2022-03-01 21:04:56 +01:00 committed by GitHub
commit 96029a584f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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
}
}