1   public static void main(String[] args) throws  CertificateException, FileNotFoundException {
2         CertificateFactory cf = CertificateFactory.getInstance("X.509");
3         FileInputStream in = new  FileInputStream("G://test.cer");
4         X509Certificate cert = (X509Certificate) cf.generateCertificate(in);
5         Date effDate = cert.getNotBefore();
6         Date expDate = cert.getNotAfter();
7         System.out.println(effDate);
8         System.out.println(expDate);
9     }

 

相关文章:

  • 2021-05-06
  • 2021-12-06
  • 2021-10-21
  • 2021-09-03
  • 2022-12-23
  • 2021-12-12
  • 2021-05-22
  • 2021-11-04
猜你喜欢
  • 2022-01-17
  • 2021-07-22
  • 2021-06-15
  • 2022-02-09
  • 2022-12-23
  • 2021-12-26
  • 2021-12-20
相关资源
相似解决方案