- Download OpenSSL for Windows from https://slproweb.com/products/Win32OpenSSL.html
- Add whichever folder you selected for binaries to your PATH
- Create a file named
example.conf
and paste this
[req]
default_bits = 2048
prompt = no
default_md = sha256
x509_extensions = v3_req
distinguished_name = dn
[dn]
C = YOUR_COUNTRY_CODE
ST = YOUR_STATE
L = YOUR_CITY
O = .
OU = .
emailAddress = YOUR_EMAIL
CN = YOUR_NICKNAME
[v3_req]
subjectAltName = @alt_names
[alt_names]
DNS.1 = localhost
- Open a terminal window in the same folder as
example.conf
and run the following commandopenssl req -new -x509 -newkey rsa:2048 -sha256 -nodes -keyout private.key -days 36525 -out private.crt -config example.cnf
- Go to Chrome's Settings>Security>Manage certificates>Import and make sure Trusted Root Certification Authorities is selected
- Move private.crt and private.key to your WSL installation (anywhere) and link them in your webpack.config.js