Skip to content

Instantly share code, notes, and snippets.

@genothomas
Created July 7, 2021 17:32
Show Gist options
  • Save genothomas/80f15620e7a6df86a113d7f6c1155080 to your computer and use it in GitHub Desktop.
Save genothomas/80f15620e7a6df86a113d7f6c1155080 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# validates if key and cert are matched
#
openssl rsa -noout -modulus -in $1 | openssl md5
openssl x509 -noout -modulus -in $2 | openssl md5
echo "if the md5 matches, the key matches the cert"
# check info in csr
#openssl req -text -noout -verify -in my.csr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment