====== 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: * ''[[http://www.openssl.org/docs/apps/pkcs7.html|pkcs7]]'': PKCS#7 utility * ''[[http://www.openssl.org/docs/apps/pkcs7.html#item__in|-in file.pem]]'': This specifies the input filename to read from or standard input if this option is not specified. * ''[[http://www.openssl.org/docs/apps/pkcs7.html#item__print_certs|-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. * ''[[http://www.openssl.org/docs/apps/pkcs7.html#item__out|-out certs.pem]]'': specifies the output filename to write to or standard output by default. {{tag>cryptography howto openssl security}}