Skip to content

Commit

Permalink
Fix no new variables error and failing to return when error exists from
Browse files Browse the repository at this point in the history
validating
  • Loading branch information
jm96441n committed Jun 27, 2023
1 parent 8ba9e20 commit 31c65cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion agent/structs/config_entry_inline_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ func (e *InlineCertificateConfigEntry) Validate() error {
return errors.New("failed to parse private key PEM")
}

err := validateKeyLength(privateKeyBlock)
err = validateKeyLength(privateKeyBlock)
if err != nil {
return err
}

certificateBlock, _ := pem.Decode([]byte(e.Certificate))
if certificateBlock == nil {
Expand Down

0 comments on commit 31c65cb

Please sign in to comment.