6894461: OCSP Checker should not wrap all Exception as "Unable to send OCSP request."(introduced by #6885667)
Reviewed-by: vinnie, xuelei
--- a/jdk/src/share/classes/sun/security/provider/certpath/OCSPChecker.java Tue Nov 17 09:44:43 2009 +0000
+++ b/jdk/src/share/classes/sun/security/provider/certpath/OCSPChecker.java Wed Nov 18 12:34:26 2009 -0500
@@ -335,10 +335,13 @@
response = OCSP.check(Collections.singletonList(certId), uri,
responderCert, pkixParams.getDate());
} catch (Exception e) {
- // Wrap all exceptions in CertPathValidatorException so that
- // we can fallback to CRLs, if enabled.
- throw new CertPathValidatorException
- ("Unable to send OCSP request", e);
+ if (e instanceof CertPathValidatorException) {
+ throw (CertPathValidatorException) e;
+ } else {
+ // Wrap exceptions in CertPathValidatorException so that
+ // we can fallback to CRLs, if enabled.
+ throw new CertPathValidatorException(e);
+ }
}
RevocationStatus rs = (RevocationStatus) response.getSingleResponse(certId);