5.2.3 Converting the Web server private key format (openssl.bat pkcs8 command or openssl.sh pkcs8 command) (when using elliptic curve cryptography)
This section describes how to convert the format of a Web server private key by using the openssl.bat pkcs8 command or openssl.sh pkcs8 command.
- Organization of this subsection
(1) Format
In Windows
openssl.bat pkcs8 -topk8 -in input-file -out output-file -nocrypt
In UNIX
openssl.sh pkcs8 -topk8 -in input-file -out output-file -nocrypt
(2) Parameters
-
-in input-file
Specify the private key file before conversion.
-
-out output-file
Specify the private key file after conversion.
-
-nocrypt
The private key after conversion will not be encrypted.
(3) Use example
The following example shows how to convert the Web server private key httpsdkey.pem in the PKCS#1 format to the Web server private key httpsdkey2.pem in the PKCS#8 format.
In Windows
openssl.bat pkcs8 -topk8 -in httpsdkey.pem -out httpsdkey2.pem -nocrypt
In UNIX
openssl.sh pkcs8 -topk8 -in httpsdkey.pem -out httpsdkey2.pem -nocrypt