User Tools

Site Tools


info:cryptography:openssl:print_all_certificates_in_a_file
Please note, that this is an old archived version of this site. Check out the new version at andunix.net!

Print all certificates in a file

This command is especially helpful if you want to use Tomcat-/Java-Keystore-Certificates with the Apache webserver. Use the -print_certs to print all the certificates and then cut the file and store each certificate in a single file.

 openssl pkcs7 -in file.pem -print_certs -out certs.pem

Informations about the used arguments from the OpenSSL man page:

  • pkcs7: PKCS#7 utility
  • -in file.pem: This specifies the input filename to read from or standard input if this option is not specified.
  • -print_certs: prints out any certificates or CRLs contained in the file. They are preceded by their subject and issuer names in one line format.
  • -out certs.pem: specifies the output filename to write to or standard output by default.
info/cryptography/openssl/print_all_certificates_in_a_file.txt · Last modified: 2013-02-18 14:27 by andunix