Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- hosts=(HOSTNAME-vip{1..4})
- for a in ${hosts[@]}
- do
- echo "=== $a ==="
- f=$(mktemp)
- openssl s_client -connect $a:443 2>$f </dev/null |\
- sed -n '/^-*BEGIN/,/^-*END/p' |\
- openssl x509 -noout -text |\
- sed -n 's/^ //;
- /Issuer:/,/Subject:/p;
- /Subject Alternative Name:/,+1p'
- echo
- unlink $f
- done
Add Comment
Please, Sign In to add comment