Re: How to dump all certificates from a file?

2021-04-07 Thread David von Oheimb
I also had this problem several years back but did not find the nifty though counter-intuitive workaround using cr2pkcs7 given below. Since then I've been using a Perl script like this: > #!/usr/bin/perl > $/ = '-END CERTIFICATE-'; > while(<>) { > if(m|$/|s) { > print STDERR

Re: How to dump all certificates from a file?

2021-04-06 Thread Nan Xiao
Hi Viktor, > By "a file" you clearly mean a "PEM file" with one or more certificates exclosed in "-BEGIN ...".."-END ..." delimiters. Yes, this is what I mean. > openssl crl2pkcs7 -nocrl -certfile somefile.pem | opessl pkcs7 -print_certs -text Works like a charm! Thanks very

Re: How to dump all certificates from a file?

2021-04-06 Thread Viktor Dukhovni
On Wed, Apr 07, 2021 at 10:14:42AM +0800, Nan Xiao wrote: > Greetings from me! By default openssl-x509 can only dump one > certificate from the file: By "a file" you clearly mean a "PEM file" with one or more certificates exclosed in "-BEGIN ...".."-END ..." delimiters. With that

How to dump all certificates from a file?

2021-04-06 Thread Nan Xiao
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 Certificate: Data: Version: 3 (0x2) Serial Number: 84:82:2c:5f:1c:62:d0:40 Signature Algorithm: