コード例 #1
0
  public void checkValidity(Date date)
      throws CertificateExpiredException, CertificateNotYetValidException {
    if (date.getTime() > this.getNotAfter().getTime()) // for other VM compatibility
    {
      throw new CertificateExpiredException("certificate expired on " + c.getEndDate().getTime());
    }

    if (date.getTime() < this.getNotBefore().getTime()) {
      throw new CertificateNotYetValidException(
          "certificate not valid till " + c.getStartDate().getTime());
    }
  }
コード例 #2
0
 public Date getNotAfter() {
   return c.getEndDate().getDate();
 }