Skip to content

Instantly share code, notes, and snippets.

@boina-n
Last active June 24, 2020 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boina-n/574a5372413dbc481f2d515fde6dd2f5 to your computer and use it in GitHub Desktop.
Save boina-n/574a5372413dbc481f2d515fde6dd2f5 to your computer and use it in GitHub Desktop.
Curl and openssl for verification of SSL certificat - CheatSheet
$ 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