#!/bin/bash
set -eu
for file ; do
    echo "==== $file"
    if file -L "$file"|grep -qs certificate ; then
        openssl x509 -noout -text -in "$file" -inform pem
    else
        openssl rsa  -noout -text -in "$file"
    fi
done
ViewGit