aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanesh Dadachanji <[email protected]>2012-04-02 11:23:18 -0400
committerDanesh Dadachanji <[email protected]>2012-04-02 11:23:18 -0400
commit9a53b5167e56106f4d225059262c124e929b7352 (patch)
tree603e764451b63f12aaec8442d7c3f15e27f2c1e9
parent554326d2e7207e1ecab10a6c5bdd8bde6bbf0307 (diff)
Fixed check for a certificate whose start date has not yet been reached.
-rw-r--r--ChangeLog7
-rw-r--r--netx/net/sourceforge/jnlp/tools/JarSigner.java6
2 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6bc9f11..e3e2d72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-03-30 Danesh Dadachanji <[email protected]>
+
+ Certificate start dates are not being checked, they are still verified
+ even if the date has yet not been reached.
+ * netx/net/sourceforge/jnlp/tools/JarSigner.java (verifyJar): If the start
+ date is in the future, set notYetValidCert to true.
+
2012-03-21 Omair Majid <[email protected]>
* tests/netx/unit/net/sourceforge/jnlp/JNLPMatcherTest.java
diff --git a/netx/net/sourceforge/jnlp/tools/JarSigner.java b/netx/net/sourceforge/jnlp/tools/JarSigner.java
index 9ddbf6b..fbae6e2 100644
--- a/netx/net/sourceforge/jnlp/tools/JarSigner.java
+++ b/netx/net/sourceforge/jnlp/tools/JarSigner.java
@@ -297,9 +297,15 @@ public class JarSigner implements CertVerifier {
if (cert instanceof X509Certificate) {
checkCertUsage((X509Certificate) cert, null);
if (!showcerts) {
+ long notBefore = ((X509Certificate) cert)
+ .getNotBefore().getTime();
long notAfter = ((X509Certificate) cert)
.getNotAfter().getTime();
+ if (now < notBefore) {
+ notYetValidCert = true;
+ }
+
if (notAfter < now) {
hasExpiredCert = true;
} else if (notAfter < now + SIX_MONTHS) {