【文件属性】:
文件名称:Java从文件中读取数字证书.rar
文件大小:14KB
文件格式:RAR
更新时间:2022-07-30 05:32:55
Java源码-系统相关
Java生成 数字证书源码,从文件中读取数字证书,生成文件输入流,输入文件为c:/mycert.cer,获取一个处理X.509证书的证书工厂,获取证书,请查看以下相关代码:
//生成文件输入流,输入文件为c:/mycert.cer
FileInputStream fin = new FileInputStream("c:/mycert.cer");
//获取一个处理X.509证书的证书工厂
CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
//获取证书
Certificate mycert = certFactory.generateCertificate(fin);
fin.close();
System.out.println(mycert);
【文件预览】:
srcfans.com
----数字证书()
--------CertificateExample.class(868B)
--------mycert.cer(764B)
--------94-1.bmp(538KB)
--------CertificateExample.java(675B)