Skip to content

Instantly share code, notes, and snippets.

@unreal4u
Forked from hyperized/ssl.md
Created March 6, 2018 09:41
Show Gist options
  • Save unreal4u/669de12555ee8578384fe44d86cde8f7 to your computer and use it in GitHub Desktop.
Save unreal4u/669de12555ee8578384fe44d86cde8f7 to your computer and use it in GitHub Desktop.

Verify matching signatures

Verify the CSR:

openssl req -noout -modulus -in star_mydomain_tld.csr | openssl md5

Verify the KEY:

openssl rsa -noout -modulus -in star_mydomain_tld.key | openssl md5

Verify the CRT:

openssl x509 -noout -modulus -in star_mydomain_tld.crt | openssl md5

All three at once:

cd star_mydomain_tld/
domain=`basename "$PWD"`
openssl req -noout -modulus -in $domain.csr | openssl md5
openssl rsa -noout -modulus -in $domain.key | openssl md5
openssl x509 -noout -modulus -in $domain.crt | openssl md5

All three results must be identical like this:

I:request myuser$ openssl x509 -noout -modulus -in star_mydomain_tld.crt | openssl md5
(stdin)= 6a606609ebda20a5538728dd9c381ac5
I:request myuser$ openssl req -noout -modulus -in star_mydomain_tld.csr | openssl md5
(stdin)= 6a606609ebda20a5538728dd9c381ac5
I:request myuser$ openssl rsa -noout -modulus -in star_mydomain_tld.key | openssl md5
(stdin)= 6a606609ebda20a5538728dd9c381ac5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment