Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
lgfa29 committed Feb 3, 2022
1 parent 2e72cde commit c5a2a77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nomad/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ func (ctx *RPCContext) ValidateCertificateForName(name string) error {
return errors.New("missing certificate information")
}

validNames := append(cert.DNSNames, cert.Subject.CommonName)
validNames := []string{cert.Subject.CommonName}
validNames = append(validNames, cert.DNSNames...)
for _, valid := range validNames {
if name == valid {
return nil
Expand Down

0 comments on commit c5a2a77

Please sign in to comment.