From b5ce082da5f64d2adc2257faaeaae83525841e10 Mon Sep 17 00:00:00 2001 From: trimstray Date: Tue, 9 Jun 2020 10:24:55 +0200 Subject: [PATCH] fix TOC; add 'Extract certs from p7b' - signed-off-by: trimstray --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 9e3a9c3..b2d5fa7 100644 --- a/README.md +++ b/README.md @@ -2758,6 +2758,16 @@ openssl pkcs12 -in ${_fd_pfx} -nocerts -nodes -out ${_fd_key} ) openssl pkcs12 -in ${_fd_pfx} -nodes -out ${_fd_pem} ) ``` +###### Extract certs from p7b + +```bash +# PKCS#7 file doesn't include private keys. +( _fd_p7b="cert.p7b" ; _fd_pem="cert.pem" ; \ +openssl pkcs7 -inform DER -outform PEM -in ${_fd_p7b} -print_certs > ${_fd_pem}) +# or: +openssl pkcs7 -print_certs -in -in ${_fd_p7b} -out ${_fd_pem}) +``` + ###### Convert DER to PEM ```bash