Skip to content

Commit

Permalink
cmd/nebula-cert: fix clobbered error
Browse files Browse the repository at this point in the history
Signed-off-by: Lars Lehtonen <[email protected]>
  • Loading branch information
alrs committed Dec 1, 2023
1 parent 01cddb8 commit ab2066e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/nebula-cert/ca.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,9 @@ func ca(args []string, out io.Writer, errOut io.Writer, pr PasswordReader) error
return fmt.Errorf("error while signing: %s", err)
}

var b []byte
if *cf.encryption {
b, err := cert.EncryptAndMarshalSigningPrivateKey(curve, rawPriv, passphrase, kdfParams)
b, err = cert.EncryptAndMarshalSigningPrivateKey(curve, rawPriv, passphrase, kdfParams)
if err != nil {
return fmt.Errorf("error while encrypting out-key: %s", err)
}
Expand Down

0 comments on commit ab2066e

Please sign in to comment.