Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rcarrata
Created June 14, 2022 15:05
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 rcarrata/5c59fa335bf83ae9b6bf71ae5ea38bfa to your computer and use it in GitHub Desktop.
Save rcarrata/5c59fa335bf83ae9b6bf71ae5ea38bfa to your computer and use it in GitHub Desktop.
Check Certificates from OpenShift 4
#!/bin/bash
API=$(oc whoami --show-server | cut -d '/' -f3-)
APPS=$(oc whoami --show-console | cut -d '.' -f2-)
APPS_ROUTE="*.$APPS:443"
echo "## Certificate for $APPS_ROUTE"
echo | openssl s_client -connect $APPS_ROUTE | openssl x509 -noout -text
echo "--------------------------------"
echo ""
echo "--------------------------------"
echo "## Certificate for $API"
echo | openssl s_client -connect $API | openssl x509 -noout -text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment