Skip to content

Instantly share code, notes, and snippets.

@holly
Created December 4, 2012 15:53
Show Gist options
  • Save holly/4205398 to your computer and use it in GitHub Desktop.
Save holly/4205398 to your computer and use it in GitHub Desktop.
openssl key and cert verify pair one-liner function
verify_keypair() { diff <(openssl rsa -in $1 -modulus -noout) <(openssl x509 -in $2 -modulus -noout) >/dev/null 2>&1 ; return $?; };
$ 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