Verify SSL Certificate matches Private Key: Difference between revisions
From Leo's Notes
This page was last edited on 8 May 2019, at 20:19.
Created page with "When given a private key and a signed SSL certificate, to validate whether the private key matches that of the certificate: {{highlight|lang=terminal|code= # openssl x509 -mo..." |
No edit summary |
||
| Line 3: | Line 3: | ||
{{highlight|lang=terminal|code= | {{highlight|lang=terminal|code= | ||
# openssl x509 -modulus -noout -in server.crt | # openssl x509 -modulus -noout -in server.crt | ||
Modulus= | Modulus=BEF773CAF4790... | ||
# openssl rsa -modulus -noout -in server.key | # openssl rsa -modulus -noout -in server.key | ||
Modulus= | Modulus=BEF773CAF4790... | ||
}} | }} | ||
Revision as of 20:19, 8 May 2019
When given a private key and a signed SSL certificate, to validate whether the private key matches that of the certificate:
# openssl x509 -modulus -noout -in server.crt
Modulus=BEF773CAF4790...
# openssl rsa -modulus -noout -in server.key
Modulus=BEF773CAF4790...
If the two modulus matches, the private key is for the certificate.