Skip to content

Instantly share code, notes, and snippets.

@envygeeks
Last active June 8, 2019 03:00
Show Gist options
  • Save envygeeks/c2998e292831103796ec913bf2d7f97e to your computer and use it in GitHub Desktop.
Save envygeeks/c2998e292831103796ec913bf2d7f97e to your computer and use it in GitHub Desktop.
#!/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