linux_wiki:openssl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_wiki:openssl [2018/02/22 22:55]
billdozor [Generate Self-Signed from Existing Private Key]
linux_wiki:openssl [2019/05/25 23:50] (current)
Line 77: Line 77:
  
 Generate a self-signed cert from an existing private key and existing CSR Generate a self-signed cert from an existing private key and existing CSR
-<code bash></code>+<code bash>openssl x509 -signkey MYSITE.key -in MYSITE.csr -req -days 365 -out MYSITE.crt</code>
  
 ---- ----
Line 84: Line 84:
  
 Converting certificates from one type to another. Converting certificates from one type to another.
 +
 +\\
 +===== Extract Cert, Key, CA from PFX =====
 +  * Extract Key<code bash>openssl pkcs12 -in mycertpack.pfx -nocerts -nodes | sed -ne '/-BEGIN PRIVATE KEY-/,/-END PRIVATE KEY-/p' > mykey.key</code>
 +  * Extract Certificate<code bash>openssl pkcs12 -in mycertpack.pfx -clcerts -nokeys | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > mycert.crt</code>
 +  * Extract Certificate Authority<code bash>openssl pkcs12 -in mycertpack.pfx -cacerts -nokeys -chain | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > myCA.crt</code>
  
 \\ \\
  • linux_wiki/openssl.1519358117.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)