#!/bin/bash HOSTNAME=$1 echo | openssl s_client -servername $HOSTNAME -connect $HOSTNAME:443 2>/dev/null | openssl x509 -text