Check if an SSL certificate and private key match in two simple
commands. The OpenSSL commands below will require you to replace
<file> with your file’s name.
For your SSL certificate:
For your RSA private key:
The output of these commands should be identical. If it isn’t, your keys do not match.
Once you have your CSR generated, you can use our SSL Wizard to find the best SSL certificate that will meet your needs. If you are familiar with OpenSSL you can use the following command to generate a CSR and private key:
For your SSL certificate:
openssl x509 -noout -modulus -in (Certificate file) | md5sum
For your RSA private key:
openssl rsa -noout -modulus -in (Key file) | md5sum
The output of these commands should be identical. If it isn’t, your keys do not match.
- The pipe to md5sum is solely to make the output shorter and easier to visually compare
How do I generate a CSR and private key?
You need to generate a CSR and private key on the server that the certificate will be used on. You can find instructions in your server documentation or try the instructions from one of these certificate authorities:Once you have your CSR generated, you can use our SSL Wizard to find the best SSL certificate that will meet your needs. If you are familiar with OpenSSL you can use the following command to generate a CSR and private key:
openssl req -new -keyout server.key -out server.csrHow do I decode a CSR?
You can easily decode your CSR to see what is in it by using our CSR Decoder. In order to decode a CSR on your own machine using OpenSSL, use the following command:openssl req -in server.csr -noout -text
No comments:
Post a Comment