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

ELY-2692 Merge an if statement with the enclosing one in X509RevocationTrustManager
  • Loading branch information
gabrielpadilh4 committed Oct 18, 2023
1 parent ba17f4c commit b6b8549
Showing 1 changed file with 7 additions and 8 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) {
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 (!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 b6b8549

Please sign in to comment.