我安装了JDK1.5.0,和Win32OpenSSL-v0.9.8a.exe。
两个问题:
1. 我生成了crt格式的证书,然后生成keystore,产生如下错误:
java.security.cert.CertificateParsingException: invalid DER-encoded certificate data
证书解析异常。只要解析了无效的 DER 编码证书或者在该 Certificate 中发现了不受支持的 DER 功能,就抛出此异常
那也就是说,若要生成keystore,需要der格式的证书,对吧?
2. 那有没有openssl的命令,能够将.crt格式证书转换为.der格式呢?
如果哪位知道,请给出详细的命令,不胜感激!
两个问题:
1. 我生成了crt格式的证书,然后生成keystore,产生如下错误:
java.security.cert.CertificateParsingException: invalid DER-encoded certificate data
证书解析异常。只要解析了无效的 DER 编码证书或者在该 Certificate 中发现了不受支持的 DER 功能,就抛出此异常
那也就是说,若要生成keystore,需要der格式的证书,对吧?
2. 那有没有openssl的命令,能够将.crt格式证书转换为.der格式呢?
如果哪位知道,请给出详细的命令,不胜感激!
$ openssl x509 -in crt.pem -outform der -out crt.der
$ openssl x509 -in crt.der -inform der -text -noout
The second command is to convert the certificate
The third command is to show the content of the DER-formated certificate