On Fri, Jul 22, 2011 at 02:03:27PM -0700, Alex Lindberg wrote:

> I have a certificate file CAcert.pem containing two or more certificates 
> between BEGIN/END blocks.
> 
> the openssl command only seems to read the first certificate.
> 
> How can I extract information from all certs in a single file?

    $ openssl crl2pkcs7 -nocrl -certfile certs.pem |
        openssl pkcs7 -print_certs -text |
        pcregrep '^\s+(?:Not (?:Before|After)|Issuer|Subject)\s*:'

-- 
        Viktor.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to