Advertisement
Guest User

Untitled

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