Skip to content

Commit

Permalink
ELY-2691 Merge if statement with the enclosing one in X509RevocationT…
Browse files Browse the repository at this point in the history
…rustManager#checkCertPathLength

ELY-2691 Merge if statement with the enclosing one in X509RevocationTrustManager#checkCertPathLength
  • Loading branch information
gabrielpadilh4 committed Oct 18, 2023
1 parent ba17f4c commit e0e9df7
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,9 @@ private void checkCertPathLength(X509Certificate currCert) throws CertPathValida
X500Principal issuer = currCert.getIssuerX500Principal();

int pathLenConstraint = -1;
if (currCert.getVersion() < 3) { // version 1 or version 2
if (i == 1) {
if (subject.equals(issuer)) {
pathLenConstraint = Integer.MAX_VALUE;
}
if (currCert.getVersion() < 3) { // version 1 or version 2
if (i == 1 && subject.equals(issuer)) {
pathLenConstraint = Integer.MAX_VALUE;
}
} else {
pathLenConstraint = currCert.getBasicConstraints();
Expand Down

0 comments on commit e0e9df7

Please sign in to comment.