Skip to content

Commit

Permalink
fix: use correct method to generate Wireguard private key
Browse files Browse the repository at this point in the history
`GenerateKey` generates random 32 bytes vs. the key suitable for
Wireguard endpoint key.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
  • Loading branch information
smira committed May 24, 2022
1 parent 8318a7e commit 3a5be65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/siderolink-agent/siderolink.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func sideroLink(ctx context.Context, eg *errgroup.Group, logger *zap.Logger) err
return fmt.Errorf("error listening for gRPC API: %w", err)
}

privateKey, err := wgtypes.GenerateKey()
privateKey, err := wgtypes.GeneratePrivateKey()
if err != nil {
return fmt.Errorf("error generating key: %w", err)
}
Expand Down

0 comments on commit 3a5be65

Please sign in to comment.