Skip to content

Commit 56a63a7

Browse files
committed
fix TOC; add 'Extract certs from p7b'
- signed-off-by: trimstray <trimstray@gmail.com>
1 parent e4bd8d8 commit 56a63a7

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,9 @@
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_

doc/HELPERS.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff 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} )
76277630
openssl 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

0 commit comments

Comments
 (0)