How to generate a Self-Signed certs using OpenSSL

This solution works on both Windows 10 & Ubuntu.

$ openssl req -x509 -days 365 -newkey rsa:4096 -keyout key.pem -out cert.pem
$ openssl pkcs12 -export -in cert.pem -inkey key.pem -out cert.pfx
原文地址:https://www.cnblogs.com/matt1985/p/12977928.html