Skip to content

Commit

Permalink
ELY-2692 Merge an if statement with the enclosing one in X509Revocati…
Browse files Browse the repository at this point in the history
…onTrustManager
  • Loading branch information
gabrielpadilh4 committed Oct 18, 2023
1 parent ba17f4c commit 83a81db
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,15 +408,14 @@ private void checkCertPathLength(X509Certificate currCert) throws CertPathValida
pathLenConstraint = maxPathLength;
}

if (!subject.equals(issuer)) {
if (pathLenConstraint < i) {
if (!subject.equals(issuer) && pathLenConstraint < i) {
throw new CertPathValidatorException
("check failed: pathLenConstraint violated - "
+ "this cert must be the last cert in the "
+ "certification path", null, null, -1,
PKIXReason.PATH_TOO_LONG);
}
}

if (pathLenConstraint < maxPathLength)
maxPathLength = pathLenConstraint;
}
Expand Down

0 comments on commit 83a81db

Please sign in to comment.