Last active
June 24, 2020 07:19
-
-
Save boina-n/574a5372413dbc481f2d515fde6dd2f5 to your computer and use it in GitHub Desktop.
Curl and openssl for verification of SSL certificat - CheatSheet
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
$ hostname=app20-nadj2-test.apps.fr1.di-paas.domain | |
# If you are just interested in the code response with curl | |
$ curl -s -o /dev/null -vL $hostname 2>&1 | grep "<\|>" | |
> GET / HTTP/1.1 | |
> Host: app20-nadj2-test.apps.fr1.di-paas.domain | |
> User-Agent: curl/7.64.1 | |
> Accept: */* | |
> | |
< HTTP/1.0 503 Service Unavailable | |
< pragma: no-cache | |
< cache-control: private, max-age=0, no-cache, no-store | |
< content-type: text/html | |
# If your are using SSL/SNI | |
$REVPROXIP of the reverse proxy | |
curl -s -o /dev/null -vL --resolve $hostname:443:$REVPROXIP https://$hostname/ 2>&1 | grep "<\|>" | |
Check SSL certificat with chain: | |
openssl s_client -showcerts -verify 3 -servername $hostname -connect $NODEIP:443 </dev/null &> /tmp/ssl-check.txt | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment