SSL Certificate : Extract .key and .crt from .pfx: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
(Created page with "<pre> openssl pkcs12 -in [yourfilename.pfx] -nocerts -out [keyfilename-encrypted.key] openssl rsa -in [keyfilename-encrypted.key] -out [keyfilename-decrypted.key] openssl pkcs12 -in [yourfilename.pfx] -clcerts -nokeys -out [certificatename.crt] </pre> Category : Debian")
 
No edit summary
 
Line 1: Line 1:
= Certificate and Private Key =
<pre>
<pre>
openssl pkcs12 -in [yourfilename.pfx]          -nocerts -out        [keyfilename-encrypted.key]
openssl pkcs12 -in [yourfilename.pfx]          -nocerts -out        [keyfilename-encrypted.key]
openssl rsa -in    [keyfilename-encrypted.key] -out                  [keyfilename-decrypted.key]
openssl rsa -in    [keyfilename-encrypted.key] -out                  [keyfilename-decrypted.key]
openssl pkcs12 -in [yourfilename.pfx]          -clcerts -nokeys -out [certificatename.crt]
openssl pkcs12 -in [yourfilename.pfx]          -clcerts -nokeys -out [certificatename.crt]
</pre>
= Privacy Enhanced Mail (PEM) =
<pre>
openssl pkcs12 -in [yourfilename.pfx]          -out                  [yourfilename.pem] -nodes
</pre>
</pre>


[[Category : Debian]]
[[Category : Debian]]

Latest revision as of 22:41, 14 January 2024

Certificate and Private Key

openssl pkcs12 -in [yourfilename.pfx]          -nocerts -out         [keyfilename-encrypted.key]
openssl rsa -in    [keyfilename-encrypted.key] -out                  [keyfilename-decrypted.key]
openssl pkcs12 -in [yourfilename.pfx]          -clcerts -nokeys -out [certificatename.crt]

Privacy Enhanced Mail (PEM)

openssl pkcs12 -in [yourfilename.pfx]          -out                   [yourfilename.pem] -nodes