简体   繁体   English

Apache SSL使用openssl将itermediateCA.cer转换为crt

[英]Apache SSL Converting itermediateCA.cer to crt with openssl

Try to convert IntermidiateCA.cer to crt formmat for Apache but I couldn't. 尝试将IntermidiateCA.cer转换为crt for Apache格式,但是我做不到。 I use the following command below: 我在下面使用以下命令:

openssl x509 -inform DER -in IntermediateCA.cer -out IntermediateCA.crt

This the error I got below 这是我下面的错误

unable to load certificate
4276141236:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong 
tag:tasn_dec.c:1198:
 4276141236:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested 
asn1 error:tasn_dec.c:372:Type=X509

Kindly note the server is solaris 5.10 请注意,服务器为solaris 5.10

There are two common certificate encoding types. 有两种常见的证书编码类型。 If you can read the "----BEGIN CERTIFICATE----" then it's PEM encoded. 如果您可以阅读“ ---- BEGIN CERTIFICATE ----”,则说明它是PEM编码的。 If not, DER (binary) encoded. 如果不是,则对DER(二进制)进行编码。 Trying to convert with the openssl x509 command specifying the wrong encoding will produce the error you got. 尝试使用openssl x509命令指定错误的编码进行转换将产生您得到的错误。

If certificate file is DER encoded (binary) 如果证书文件是DER编码的(二进制)

openssl x509 -inform DER -in certificate.cer -out certificate.crt

If certificate is PEM encoded (human readable) 如果证书是PEM编码的(人类可读)

openssl x509 -inform PEM -in certificate.cer -out certificate.crt

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM