如何从Java中的epass2003读取证书

时间:2018-08-02 10:51:07

标签: java security cryptography crt

我想在插入eToken时从eToken中读取证书,当我将其存储在计算机上时可以读取我的证书,但是我想从epass2003中读取证书。我不知道如何从epass2003中读取它。所以,请帮我 感谢advnce

String fileName = "C:\\myCert.cer";

InputStream inStream = new FileInputStream(fileName);
CertificateFactory cf = CertificateFactory.getInstance("X.509");
X509Certificate cert = (X509Certificate)cf.generateCertificate(inStream);
inStream.close();

0 个答案:

没有答案