Last active
November 22, 2018 19:16
-
-
Save rjhowe/686e3729c2176b446f55dd6d6f1cdc22 to your computer and use it in GitHub Desktop.
OpenShift Cert Issuer Check
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/bash | |
opensslcmd="openssl x509 -noout -issuer" | |
if [[ -d /etc/origin/master ]]; then | |
printf "%b%bOCP Master Certs%b\n" "\033[1m" "\033[33m" "\033[0;0m" | |
pushd /etc/origin/master/ | |
for i in `ls *.crt`; do | |
echo $i | |
$opensslcmd -in $i | |
printf "\n" | |
done | |
printf "%b%bOCP Master Kubeconfig%b\n" "\033[1m" "\033[33m" "\033[0;0m" | |
for i in `ls *.kubeconfig`; do | |
echo $i | |
awk '/certificate-authority-data/ {print $2}' $i | base64 -d | $opensslcmd | |
printf "\n" | |
done | |
popd | |
fi | |
if [[ -d /etc/origin/node ]]; then | |
printf "%b%bOCP Node certs%b\n" "\033[1m" "\033[33m" "\033[0;0m" | |
pushd /etc/origin/node | |
for i in `ls ./*/*current.pem && ls *.crt`; do | |
echo $i | |
$opensslcmd -in $i | |
printf "\n" | |
done | |
printf "%b%bOCP Node Kubeconfig%b\n" "\033[1m" "\033[33m" "\033[0;0m" | |
for i in `ls *.kubeconfig`; do | |
echo $i | |
awk '/certificate-authority-data/ {print $2}' $i | base64 -d | $opensslcmd | |
printf "\n" | |
done | |
popd | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment