首页 > 解决方案 > 无法将 .pem 转换为 .der

问题描述

我正在尝试将 .pem 文件转换为使用 OpenSSL 提供给我但未成功的 .der 文件。.pem 文件受密码保护。文件包含证书和私钥

使用的命令

openssl x509 -outform der -in certificate.pem -out certificate.der

我收到这个错误

unable to load certificate
540409864:error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag:crypto/asn1/tasn_dec.c:1130:
540409864:error:0D07803A:asn1 encoding routines:asn1_item_embed_d2i:nested asn1 error:crypto/asn1/tasn_dec.c:290:Type=X509
540409864:error:0906700D:PEM routines:PEM_ASN1_read_bio:ASN1 lib:crypto/pem/pem_oth.c:33:

请教我如何解决这个问题,谢谢

标签: opensslcertificatessl-certificatepemder

解决方案


推荐阅读