无效的DER编码的CRL数据java

时间:2013-02-26 03:42:03

标签: java x509 certificate-revocation

我正在尝试检查x509证书是否被撤销:

CertificateFactory cf = CertificateFactory.getInstance("X.509");
X509CRL crl = (X509CRL) cf.generateCRL(crlFile);
if (crl.isRevoked(certRSA)) {
    System.out.println("REVOKED");
} else {
    System.out.println("NOT REVOKED");
}

并获得此例外:

java.security.cert.CRLException: Invalid DER-encoded CRL data
    at sun.security.x509.X509CRLImpl.parse(X509CRLImpl.java:981)
    at sun.security.x509.X509CRLImpl.<init>(X509CRLImpl.java:144)
    ....

如何将该crl文件转换为DER编码的crl文件?谢谢!

0 个答案:

没有答案