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
  • Loading branch information
gabrielpadilh4 committed Oct 18, 2023
1 parent ba17f4c commit 08335ac
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,8 @@ 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 && i == 1 && subject.equals(issuer)) { // version 1 or version 2
pathLenConstraint = Integer.MAX_VALUE;
} else {
pathLenConstraint = currCert.getBasicConstraints();
}
Expand Down

0 comments on commit 08335ac

Please sign in to comment.