diff --git a/src/org/kontalk/crypto/X509Bridge.java b/src/org/kontalk/crypto/X509Bridge.java index 18bebfa7e..30bdcd0ad 100644 --- a/src/org/kontalk/crypto/X509Bridge.java +++ b/src/org/kontalk/crypto/X509Bridge.java @@ -204,7 +204,7 @@ public static X509Certificate createCertificate(PGPPublicKeyRing publicKeyRing, * (defaults to current date and time if null) * @param endDate * date until which the certificate will be valid - * (defaults to current date and time if null) * + * (defaults to start date and time if null) * @param subjAltNameURI * URI to be placed in subjectAltName * @return self-signed certificate @@ -242,8 +242,7 @@ private static X509Certificate createCertificate(PublicKey pubKey, } certGenerator.setNotBefore(startDate); if (endDate == null) { - endDate = new Date(startDate.getTime()+(365L*24L*60L*60L*1000L)); - System.out.println("end date is="+ DateFormat.getDateInstance().format(endDate)); + endDate = startDate; } certGenerator.setNotAfter(endDate);