Skip to content

Commit

Permalink
Ensure we assign the privateCAKey outside the if block
Browse files Browse the repository at this point in the history
  • Loading branch information
cmmarslender committed Sep 12, 2024
1 parent 078603b commit 7dfad16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/tls/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ func GenerateAllCerts(outDir string, privateCACert *x509.Certificate, privateCAK

if privateCACert == nil && privateCAKey == nil {
// If privateCACert and privateCAKey are both nil, we will generate a new one
privateCACertDER, privateCAKey, err := GenerateNewCA()
var privateCACertDER []byte
privateCACertDER, privateCAKey, err = GenerateNewCA()
if err != nil {
return fmt.Errorf("error creating private ca pair: %w", err)
}
Expand Down

0 comments on commit 7dfad16

Please sign in to comment.