How to generate a pem certificate? in an easy way, for testing [duplicate]
Solution 1:
first generate CSR and KEY:
openssl req -new -newkey rsa:4096 -nodes -keyout snakeoil.key -out snakeoil.csr
then generate PEM and self-sign with KEY:
openssl x509 -req -sha256 -days 365 -in snakeoil.csr -signkey snakeoil.key -out snakeoil.pem