displays every cert in the trust chain in PEM file
[feisty_meow.git] / scripts / security / show_all_cert_chains.sh
1 #!/bin/bash
2
3 file="$1"; shift
4 if [ -z "$file" -o ! -f "$file" ]; then
5   echo This script requires a PEM-format file name to show the certificates within.
6   exit 1
7 fi
8
9 openssl crl2pkcs7 -nocrl -certfile "$file" | openssl pkcs7 -print_certs -text -noout
10