quickly creating a self certificate using openssl
We can do this by running the following commands:-
Create a key
openssl genrsa -out mycert.key 2048
openssl req -new -key mycert.key -out mycert.csr
create a self signed certificate
openssl x509 -req -days 365 -in mycert.csr -signkey mycert.key -out mycert.crt
And finally validating it
openssl x509 -in mycert.crt -text -noout
It is important to chain your certicate too. Otherwise it can hit some issues - for production certificate
cat mycert.key mycert.crt > mycert.pem
Comments