changeset 8254:cf7ba6545f99

OPENJDK7-05: Fix mistake in 8075374 backport Reviewed-by: andrew
author omajid
date Sat, 11 Jul 2015 16:19:35 +0100
parents a0ed79d5759f
children a5b95f264e57
files src/share/classes/sun/security/provider/certpath/OCSPResponse.java
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/provider/certpath/OCSPResponse.java	Tue Jul 07 14:28:43 2015 +0100
+++ b/src/share/classes/sun/security/provider/certpath/OCSPResponse.java	Sat Jul 11 16:19:35 2015 +0100
@@ -711,16 +711,15 @@
                 }
                 DEBUG.println("OCSP response validity interval is from " +
                               thisUpdate + until);
+                DEBUG.println("Checking validity of OCSP response on: " +
+                    new Date(now));
             }
-            // Check that the test date is within the validity interval
-            if ((thisUpdate != null && nowPlusSkew.before(thisUpdate)) ||
-                (nextUpdate != null && nowMinusSkew.after(nextUpdate))) {
             // Check that the test date is within the validity interval:
             //   [ thisUpdate - MAX_CLOCK_SKEW,
             //     MAX(thisUpdate, nextUpdate) + MAX_CLOCK_SKEW ]
             if (nowPlusSkew.before(thisUpdate) ||
                 nowMinusSkew.after(
-                    nextUpdate != null ? nextUpdate : thisUpdate))
+                    nextUpdate != null ? nextUpdate : thisUpdate)) {
 
                 if (DEBUG != null) {
                     DEBUG.println("Response is unreliable: its validity " +