Date notAfter = new Date(); notAfter.setTime(notAfter.getTime() + ( validity * 24 * 60 * 60 * 1000)); return generateCertificate(subject, publicKey, keyusage, notAfter, certProfile);
Date notAfter = null; if(validity != -1) { notAfter = new Date(); notAfter.setTime(notAfter.getTime() + ( validity * 24 * 60 * 60 * 1000)); } return generateCertificate(subject, publicKey, keyusage, notAfter, certProfile);
    public Certificate generateCertificate(UserDataVO subject,             PublicKey publicKey,             int keyusage,             long validity,            CertificateProfile certProfile) throws Exception {    	// Calculate the notAfter date        Date notAfter = new Date();        notAfter.setTime(notAfter.getTime() + ( validity * 24 * 60 * 60 * 1000));        	    	return generateCertificate(subject, publicKey, keyusage, notAfter, certProfile);    }