changeset 4318:fdcb5ce9dc00

6894461: OCSP Checker should not wrap all Exception as "Unable to send OCSP request."(introduced by #6885667) Reviewed-by: vinnie, xuelei
author mullan
date Wed, 18 Nov 2009 12:34:26 -0500
parents 7d4f50f3806c
children 6508d71adfd1
files jdk/src/share/classes/sun/security/provider/certpath/OCSPChecker.java
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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);