Last active
August 29, 2015 14:27
-
-
Save coffeesam/fc7b7b7ee080549ed54e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| DOMAIN=`echo $1 | sed 's/https:\/\///' | sed -E 's/\/.*$//'` | |
| URL="https://$DOMAIN" | |
| if [ -z $URL ]; then | |
| cat << EOF | |
| Usage: ckrootca <url> | |
| EOF | |
| else | |
| curl -c $DOMAIN.cookie -I -vs $URL 2>&1 | grep "Server certificate" -B1 | tail -n1 | |
| fi |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated script not to recursively follow redirects, just perform a check on the root URL
FIXME: should follow redirect if subsequent domain differs from requested