File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 398398 * [ Generate certificate with 4096 bit private key] ( doc/HELPERS.md#generate-certificate-with-4096-bit-private-key )
399399 * [ Generate DH public parameters] ( doc/HELPERS.md#generate-dh-public-parameters )
400400 * [ Display DH public parameters] ( doc/HELPERS.md#display-dh-public-parameters )
401+ * [ Extract private key from pfx] ( doc/HELPERS.md#extract-private-key-from-pfx )
402+ * [ Extract private key and certs from pfx] ( doc/HELPERS.md#extract-private-key-and-certs-from-pfx )
403+ * [ Extract certs from p7b] ( doc/HELPERS.md#extract-certs-from-p7b )
401404 * [ Convert DER to PEM] ( doc/HELPERS.md#convert-der-to-pem )
402405 * [ Convert PEM to DER] ( doc/HELPERS.md#convert-pem-to-der )
403406 * [ Verification of the certificate's supported purposes] ( doc/HELPERS.md#verification-of-the-certificates-supported-purposes )
@@ -1085,6 +1088,7 @@ Existing chapters:
10851088 - [x] _ Generate certificate with 4096 bit private key_
10861089 - [x] _ Generate DH public parameters_
10871090 - [x] _ Display DH public parameters_
1091+ - [x] _ Extract certs from p7b_
10881092 - [x] _ Convert DER to PEM_
10891093 - [x] _ Convert PEM to DER_
10901094 - [x] _ Verification of the certificate's supported purposes_
Original file line number Diff line number Diff line change @@ -165,6 +165,9 @@ Go back to the **[Table of Contents](https://github.com/trimstray/nginx-admins-h
165165 * [ Generate certificate with 4096 bit private key] ( #generate-certificate-with-4096-bit-private-key )
166166 * [ Generate DH public parameters] ( #generate-dh-public-parameters )
167167 * [ Display DH public parameters] ( #display-dh-public-parameters )
168+ * [ Extract private key from pfx] ( #extract-private-key-from-pfx )
169+ * [ Extract private key and certs from pfx] ( #extract-private-key-and-certs-from-pfx )
170+ * [ Extract certs from p7b] ( #extract-certs-from-p7b )
168171 * [ Convert DER to PEM] ( #convert-der-to-pem )
169172 * [ Convert PEM to DER] ( #convert-pem-to-der )
170173 * [ Verification of the certificate's supported purposes] ( #verification-of-the-certificates-supported-purposes )
@@ -7627,6 +7630,16 @@ openssl pkcs12 -in ${_fd_pfx} -nocerts -nodes -out ${_fd_key} )
76277630openssl pkcs12 -in ${_fd_pfx} -nodes -out ${_fd_pem} )
76287631```
76297632
7633+ ###### Extract certs from p7b
7634+
7635+ ```bash
7636+ # PKCS#7 file doesn' t include private keys.
7637+ ( _fd_p7b=" cert.p7b" ; _fd_pem=" cert.pem" ; \
7638+ openssl pkcs7 -inform DER -outform PEM -in ${_fd_p7b} -print_certs > ${_fd_pem} )
7639+ # or:
7640+ openssl pkcs7 -print_certs -in -in ${_fd_p7b} -out ${_fd_pem} )
7641+ ` ` `
7642+
76307643# ##### Convert DER to PEM
76317644
76327645` ` ` bash
You can’t perform that action at this time.
0 commit comments