openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj '/CN=localhost' openssl pkcs12 -export -out identity.pfx -inkey key.pem -in cert.pem # Cleanup rm key.pem cert.pem