生成自签名证书
ref:https://github.com/lyphtec/idsvr4-node-jwks
Included in the sample is a self-signed PFX (cert.pfx) generated using OpenSSL. You can generate your own self-signed certs using the following commands:
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
OpenSSL on Windows
As an aside, you can get OpenSSL for Windows from here. For supporting Node development on Windows, I recommend getting the older v1.0.2L instead due to this.
Other methods
Instead of using OpenSSL, you can also use Powershell to generate self-signed certs.
浙公网安备 33010602011771号