comparison .shell.d/99.misc.zsh @ 321:e9932cf1692f

certfor: make zsh-specific This was mysteriously breaking login on my workstation.
author Augie Fackler <raf@durin42.com>
date Tue, 16 Jul 2013 13:40:31 -0400
parents .shell.d/99.misc.sh@b9e92b79bb00
children
comparison
equal deleted inserted replaced
320:2b129f63d910 321:e9932cf1692f
1 function certfor() {
2 if [ "x$1" = "x" ] ; then
3 echo 'abort: specify host:port pair as argument'
4 return 1
5 fi
6 openssl x509 -in <(echo | openssl s_client -showcerts -connect $1 | \
7 awk '/-----BEGIN CERTIFICATE-----/,/-----END CERTIFICATE-----/') -noout -text
8 }