如何将PKCS#8格式的PEM私钥转换为传统格式? [英] How to convert PKCS#8-formatted PEM private key to the traditional format?

查看:554
本文介绍了如何将PKCS#8格式的PEM私钥转换为传统格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从OpenSSL 1.0更改日志:

From OpenSSL 1.0 change log:

将PKCS#8设置为默认写入格式 对于私钥,请替换 传统格式.此表格是标准化的,更加安全,而且不会 包含隐式MD5依赖关系. [史蒂夫·汉森]

Make PKCS#8 the default write format for private keys, replacing the traditional format. This form is standardised, more secure and doesn't include an implicit MD5 dependency. [Steve Henson]

但是,我需要以前的传统格式的私钥文件. 是否可以将pem文件从PKCS#8转换为传统格式(使用OpenSSL.exe应用程序)?

However, I need the private key file in the previous, traditional format. Is it possible to convert the pem file from PKCS#8 to the traditional format (using OpenSSL.exe app)?

非常感谢您!

推荐答案

以这种方式成功解决了这一问题- 请求:

Succeeded to solve that in that way - the request:

openssl req -configconfigfile.cfg -newkey rsa:2048 -keyout newkey.pem -out newreq.pem 365

然后,我将其转换为RSA格式:

Then, I converted it to RSA format:

openssl rsa -in newkey.pem -out newkey.pem

希望它将对某人有所帮助.

Hope that it will help someone.

这篇关于如何将PKCS#8格式的PEM私钥转换为传统格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆