我正在尝试使用openssl将.key转换为.pem。运行命令
时收到此错误rsa -inder der -in file.key -outform pem -out filekey.pem
OpenSSL> rsa -inform der -in file.key -outform pem -out filekey.pem
unable to load Private Key
16956:error:0D094068:asn1 encoding routines:d2i_ASN1_SET:bad tag:.\crypto\asn1\a_set.c:195:
16956:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:.\crypto\asn1\tasn_dec.c:1316:
16956:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:.\crypto\asn1\tasn_dec.c:380:Type=RSA
16956:error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib:.\crypto\asn1\d2i_pr.c:99:
error in rsa
当我在file.key上运行此命令时,
rsa -in file.key -check
-----BEGIN RSA PRIVATE KEY-----
*Some Code*
-----END RSA PRIVATE KEY-----
我能以某种方式将其转换为我在这里得到的代码吗?