Difference between revisions of "OS4X Core - handle PFX/PKCS"

From OS4X
Jump to navigation Jump to search
(New page: = What is PFX, what is PKCS#12 = The file format PKCS#12 (also known as "PFX") is an archive format for certificate and private key transport. You can handle this file format manually in o...)
 
Line 12: Line 12:
 
  openssl pkcs12 -in test.pfx -nokeys -out cert.pem
 
  openssl pkcs12 -in test.pfx -nokeys -out cert.pem
  
= Extract private key
+
= Extract private key =
 
The following command will extract the private key to the output file "<code>key.pem</code>" without encryption:
 
The following command will extract the private key to the output file "<code>key.pem</code>" without encryption:
 
  openssl pkcs12 -in test.pfx -nocerts -out key.pem -nodes
 
  openssl pkcs12 -in test.pfx -nocerts -out key.pem -nodes

Revision as of 15:45, 4 November 2016

What is PFX, what is PKCS#12

The file format PKCS#12 (also known as "PFX") is an archive format for certificate and private key transport. You can handle this file format manually in order to import certificate and private key information to OS4X.

PFX files can be secured by a password, so when prompted for a password please provide this in the commands below.

Example assumptions

We assume in the examples below that you have a PKCS#12 file with the following name:

test.pfx

Extract public certificate

This command will output the public certificate to the output file "cert.pem":

openssl pkcs12 -in test.pfx -nokeys -out cert.pem

Extract private key

The following command will extract the private key to the output file "key.pem" without encryption:

openssl pkcs12 -in test.pfx -nocerts -out key.pem -nodes