Create a self signed cert

Create the initial key:

openssl genrsa -aes256 -out key.key 2048

Create a Certificate Signing Request:

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

Use a custom configuration to create the csr:

openssl req -new -sha256 -config CONFIG.cnf -key key.key -out csr.csr

Create the final Certificate:

openssl req -x509 -sha256 -days 365 -key key.key -in csr.csr -out certificate.crt

Remove passphrase

openssl rsa -in [file1.key] -out [file2.key]