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 398
398
* [ Generate certificate with 4096 bit private key] ( doc/HELPERS.md#generate-certificate-with-4096-bit-private-key )
399
399
* [ Generate DH public parameters] ( doc/HELPERS.md#generate-dh-public-parameters )
400
400
* [ 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 )
401
404
* [ Convert DER to PEM] ( doc/HELPERS.md#convert-der-to-pem )
402
405
* [ Convert PEM to DER] ( doc/HELPERS.md#convert-pem-to-der )
403
406
* [ Verification of the certificate's supported purposes] ( doc/HELPERS.md#verification-of-the-certificates-supported-purposes )
@@ -1085,6 +1088,7 @@ Existing chapters:
1085
1088
- [x] _ Generate certificate with 4096 bit private key_
1086
1089
- [x] _ Generate DH public parameters_
1087
1090
- [x] _ Display DH public parameters_
1091
+ - [x] _ Extract certs from p7b_
1088
1092
- [x] _ Convert DER to PEM_
1089
1093
- [x] _ Convert PEM to DER_
1090
1094
- [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
165
165
* [ Generate certificate with 4096 bit private key] ( #generate-certificate-with-4096-bit-private-key )
166
166
* [ Generate DH public parameters] ( #generate-dh-public-parameters )
167
167
* [ 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 )
168
171
* [ Convert DER to PEM] ( #convert-der-to-pem )
169
172
* [ Convert PEM to DER] ( #convert-pem-to-der )
170
173
* [ 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} )
7627
7630
openssl pkcs12 -in ${_fd_pfx} -nodes -out ${_fd_pem} )
7628
7631
```
7629
7632
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
+
7630
7643
# ##### Convert DER to PEM
7631
7644
7632
7645
` ` ` bash
You can’t perform that action at this time.
0 commit comments