ssh-keygen -t rsa -b 2048 -f <keyName>
openssl genrsa -out rootCA.key 2048
add -des3
if you want a passphraseopenssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.pem
. Now you have a self signed SSL named rootCA.pem
openssl genrsa -out device.key 2048
openssl req -new -key device.key -out device.csr
. Its important to note when answering the prompts, Common Name (eg, YOUR name) []: must match the host name of the web server you are using.openssl x509 -req -in device.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out device.crt -days 500 -sha256
Congrats you have a self-signed SSL cert.