First, Introduction
Pkey is a public or private key processing command that can be used to print and convert different forms and components
Second, the grammar
OpenSSL Pkey [-inform pem| DER] [-outform pe| DER] [- in filename] [-passin arg] [-out filename] [-passout arg] [ID]
Options
-infile file-inform X input format (DER or PEM)-passin arg file Pass phrase source-outform X output format (DER or PEM)file file -passout arg file Pass phrase source-engine e use engine E, possibly a hardware dev Ice.
Third, examples
1. Remove the RSA key input password
OpenSSL Pkey- in Prikey.pem-out Keyout.pem
2. Encrypt the private key
OpenSSL pkey– in Prikey.pem-des3-out Keyout.pem
3. Pem format private key converted to DER format private key
OpenSSL pkey– in Prikey.pem-outform der–out prikey.der
4. Extracting the public key from the private key
OpenSSL pkey– in Prikey.pem-pubout-out Pubkey.pem
Reference: http://blog.csdn.net/as3luyuan123/article/details/16330909
Openssl pkey Command