How to dump all certificates from a file?

Nan Xiao xiaonan830818 at
Wed Apr 7 02:14:42 UTC 2021

Hi OpenSSL users,

Greetings from me! By default openssl-x509 can only dump one
certificate from the file:

# openssl x509 --in /etc/ssl/cacert.pem --text --noout
        Version: 3 (0x2)
        Serial Number:
        Signature Algorithm: sha256WithRSAEncryption

I checked the code
it seems openssl-x509 only dumps the first valid one. I also went
through the manual
(, and
can't find a method to dump all certificates.

Could anyone give some clues in dumping all certificates from a file?
Thanks very much in advance!

Best Regards
Nan Xiao

More information about the openssl-users mailing list