Last active
May 16, 2016 10:03
-
-
Save arpat/a861eba9df541407a87bcb4008a6f115 to your computer and use it in GitHub Desktop.
Quick way to find matching ssl pub/priv key pairs.
This file contains 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 | |
# Quick way to find matching ssl pub/priv key pairs. | |
# usage: ./comp-ssl-certs.sh mycertfiles* | |
CertFiles="$1" | |
for Files in $(ls $CertFiles) | |
do | |
#echo "ALL FILES "$Files | |
for Type in x509 rsa | |
do | |
Mod=$(openssl $Type -noout -modulus -in $Files 2>/dev/null) \ | |
&& echo -en $Files" $Type\t\t\t" && echo $Mod | openssl md5 | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment