Last active
June 8, 2019 03:00
-
-
Save envygeeks/c2998e292831103796ec913bf2d7f97e to your computer and use it in GitHub Desktop.
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 | |
[ "$DEBUG" = "true" ] && set -x | |
set -e | |
a=$(openssl x509 -noout -modulus -in "$1".crt | openssl md5) | |
b=$(openssl rsa -noout -modulus -in "$1".key | openssl md5) | |
c=$(openssl req -noout -modulus -in "$1".csr | openssl md5) | |
if a != b || b != c || c != a; then | |
echo "Mismatch" | |
exit 1 | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment