- Generating a private key:
openssl genrsa 2048 > private.pem
- Generating the self signed certificate:
openssl req -x509 -new -key private.pem -out public.pem
- If required, creating PFX:
openssl pkcs12 -export -in public.pem -inkey private.pem -out mycert.pfx
- Check PFX contents:
openssl pkcs12 -info -in mycert.pfx