How to Create a Self-Signed SSL Certificate
This How-to applies to: Any version.
To create a self-signed certificate, use a command similar to the following:
openssl req -new -nodes -x509 -out server.crt -keyout server.key -days 720 -subj "/C=US/ST=OH/L=Cincinnati/O=Example, Inc./OU=Information Systems/CN=server.example.com/emailAddress=security@example.com"
To convert this certificate and key into a format usable by IIS, use a command similar to the following:
openssl pkcs12 -export -in server.crt -inkey server.key -out server.pfx -name "server.example.com"