Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- host=$1
- verify=$2
- openssl s_client -showcerts -verify $verify -connect $host:443 < /dev/null | awk '/BEGIN/,/END/{ if(/BEGIN/){a++}; out="certout"a".pem"; print >out}'
- openssl x509 -noout -text -purpose -in certout1.crt
- openssl x509 -noout -text -purpose -in certout2.crt
- ######How to run script###########
- # bash test.sh google.com 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement