/** * Return whether or not this attribute certificate is valid on a particular date. * * @param date the date of interest. * @return true if the attribute certificate is valid, false otherwise. */ public boolean isValidOn(Date date) { AttCertValidityPeriod certValidityPeriod = attrCert.getAcinfo().getAttrCertValidityPeriod(); return !date.before(CertUtils.recoverDate(certValidityPeriod.getNotBeforeTime())) && !date.after(CertUtils.recoverDate(certValidityPeriod.getNotAfterTime())); }
/** * Return whether or not this attribute certificate is valid on a particular date. * * @param date the date of interest. * @return true if the attribute certificate is valid, false otherwise. */ public boolean isValidOn(Date date) { AttCertValidityPeriod certValidityPeriod = attrCert.getAcinfo().getAttrCertValidityPeriod(); return !date.before(CertUtils.recoverDate(certValidityPeriod.getNotBeforeTime())) && !date.after(CertUtils.recoverDate(certValidityPeriod.getNotAfterTime())); }
/** * Return the date before which this attribute certificate is not valid. * * @return the start date for the attribute certificate's validity period. */ public Date getNotBefore() { return CertUtils.recoverDate(attrCert.getAcinfo().getAttrCertValidityPeriod().getNotBeforeTime()); }
/** * Return the date before which this attribute certificate is not valid. * * @return the start date for the attribute certificate's validity period. */ public Date getNotBefore() { return CertUtils.recoverDate(attrCert.getAcinfo().getAttrCertValidityPeriod().getNotBeforeTime()); }
X509V2AttributeCertificate( AttributeCertificate cert) throws IOException { this.cert = cert; try { this.notAfter = cert.getAcinfo().getAttrCertValidityPeriod().getNotAfterTime().getDate(); this.notBefore = cert.getAcinfo().getAttrCertValidityPeriod().getNotBeforeTime().getDate(); } catch (ParseException e) { throw new IOException("invalid data structure in certificate!"); } }
X509V2AttributeCertificate( AttributeCertificate cert) throws IOException { this.cert = cert; try { this.notAfter = cert.getAcinfo().getAttrCertValidityPeriod().getNotAfterTime().getDate(); this.notBefore = cert.getAcinfo().getAttrCertValidityPeriod().getNotBeforeTime().getDate(); } catch (ParseException e) { throw new IOException("invalid data structure in certificate!"); } }