Created
December 4, 2012 15:53
-
-
Save holly/4205398 to your computer and use it in GitHub Desktop.
openssl key and cert verify pair one-liner function
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
verify_keypair() { diff <(openssl rsa -in $1 -modulus -noout) <(openssl x509 -in $2 -modulus -noout) >/dev/null 2>&1 ; return $?; }; |
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
$ verify_keypair /path/to/key.pem /path/to/cert.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment