Merge
authorprr
Mon, 10 Oct 2016 14:26:49 -0700
changeset 41413 9493d4c6c5c0
parent 41412 4d1d88a4f815 (current diff)
parent 41381 3e7e2ee8ba73 (diff)
child 41414 7fd4548e9733
child 41781 1455c87cc28a
Merge
--- a/jdk/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java	Mon Oct 10 14:21:39 2016 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java	Mon Oct 10 14:26:49 2016 -0700
@@ -543,7 +543,7 @@
      private static class DenyAfterConstraint extends Constraint {
          private Date denyAfterDate;
          private static final SimpleDateFormat dateFormat =
-                 new SimpleDateFormat("EEE, MMM d HH:mm:ss z YYYY");
+                 new SimpleDateFormat("EEE, MMM d HH:mm:ss z yyyy");
 
          DenyAfterConstraint(String algo, int year, int month, int day) {
              Calendar c;
@@ -593,13 +593,17 @@
          public void permits(CertConstraintParameters cp)
                  throws CertPathValidatorException {
              Date currentDate;
+             String errmsg;
 
              if (cp.getJARTimestamp() != null) {
                  currentDate = cp.getJARTimestamp().getTimestamp();
+                 errmsg = "JAR Timestamp date: ";
              } else if (cp.getPKIXParamDate() != null) {
                  currentDate = cp.getPKIXParamDate();
+                 errmsg = "PKIXParameter date: ";
              } else {
                  currentDate = new Date();
+                 errmsg = "Certificate date: ";
              }
 
              if (!denyAfterDate.after(currentDate)) {
@@ -609,10 +613,9 @@
                  throw new CertPathValidatorException(
                          "denyAfter constraint check failed.  " +
                                  "Constraint date: " +
-                                 dateFormat.format(denyAfterDate) +
-                                 "; Cert date: " +
-                                 dateFormat.format(currentDate),
-                          null, null, -1, BasicReason.ALGORITHM_CONSTRAINED);
+                                 dateFormat.format(denyAfterDate) + "; "
+                                 + errmsg + dateFormat.format(currentDate),
+                         null, null, -1, BasicReason.ALGORITHM_CONSTRAINED);
              }
          }