Create a new 2048 bit RSA key

openssl genrsa -out myServer.key 2048

Create a Certificate Signing Request

openssl req -new -key myServer.key -out myServer.csr

Check if a cert matches a key

openssl x509 -noout -modulus -in myServer.crt | openssl md5 ;\
openssl rsa -noout -modulus -in myServer.key | openssl md5
Advertisements