I suggest to add the following aliases/functions to grml's zshrc:
for i in sha512 sha256 sha1 md5; do
ssl-cert-$i() { openssl x509 -noout -fingerprint -$i -in $1 }
done
ssl-cert-fingerprints() {
for i in sha512 sha256 sha1 md5; do ssl-cert-$i $1; done
}
ssl-cert-info() {
openssl x509 -noout -text -in $1
ssl-cert-fingerprints $1
}
I never can remember all the options openssl wants for displaying this very
basic information about certificates, so I guess these functions are useful for
others, too.
P.S.: I don't know why, but creating function inside a for loop doesn't seem to
work in bash (3.2). In zsh it just works[tm]. :-) |