我正在尝试检查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文件?谢谢!