Thanks.

--- On Fri, 7/22/11, Victor Duchovni <[email protected]> wrote:

From: Victor Duchovni <[email protected]>
Subject: Re: How to extract Certificate info from file with multible 
certificates?
To: [email protected]
Date: Friday, July 22, 2011, 4:15 PM

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                    [email protected]
Automated List Manager                           [email protected]

Reply via email to