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

Create a PKCS 12 file from cert/key

openssl pkcs12 -export -out myFile.pfx -inkey myServer.key -in MyServer.crt

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