PRIVATE KEY转换RSA PRIVATE KEY

Newer versions of OpenSSL say BEGIN PRIVATE KEY because they contain the private key + an OID that identifies the key type (this is known as PKCS8 format). To get the old style key (known as either PKCS1 or traditional OpenSSL format) you can do this:

openssl rsa -in server.key -out server_new.key

Alternately, if you have a PKCS1 key and want PKCS8:

openssl pkcs8 -topk8 -nocrypt -in privkey.pem

原文地址:https://stackoverflow.com/questions/17733536/how-to-convert-a-private-key-to-an-rsa-private-key

发表评论

邮箱地址不会被公开。 必填项已用*标注