code: public Date getNotAfter() {
          if (info == null)
              return null;
          try {
              Date d = (Date) info.get(CertificateValidity.NAME + DOT +
                                       CertificateValidity.NOT_AFTER);
              return d;
          } catch (Exception e) {
              return null;
          }
      }
docs: Gets the notAfter date from the validity period of the certificate.
  
  @return the end date of the validity period.