Ramblings from MostlyChris

Tech stuff and a bit more

Browsing Posts tagged SSL

Read the contents of a cert: openssl x509 -text -in [cert file] Generate 2048 bit key and CSR: openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key Creating a self-signed cert with one command openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout www.example.com.pem  -out www.example.com.pem Verify key and cert match: (openssl x509 [...]

If you would like to verify that the key and the certificate match you need to compare the modulus in both of the key file and the certificate file. You can check for differences in the modulus rather easily by sending the output of the comparison command to 'uniq'. If anything shows up, the numbers [...]