Skip to content

Commit

Permalink
remove order check
Browse files Browse the repository at this point in the history
  • Loading branch information
morphy2k committed Aug 14, 2023
1 parent 1a91d63 commit 6444149
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions middleware/jwt/cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,6 @@ func parseCertsFromPEM(path string) ([]*x509.Certificate, error) {
certs = append(certs, cert)
}

lastIdx := len(certs) - 1
for i := lastIdx; i >= 0; i-- {
c := certs[i]
if i == lastIdx && c.IsCA || i < lastIdx && !c.IsCA {
return nil, errors.New("invalid certificate chain")
}
}

return certs, nil
}

Expand Down

0 comments on commit 6444149

Please sign in to comment.