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     }

 

分类:

技术点:

相关文章: