notes/express.md

29 lines
760 B
Markdown
Raw Normal View History

2020-01-12 21:28:28 -05:00
create self-signed cert
https://docs.nodejitsu.com/articles/HTTP/servers/how-to-create-a-HTTPS-server/
```
openssl genrsa -out key.pem
openssl req -new -key key.pem -out csr.pem
openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem
rm csr.pem
```
##Chrome stops accepting self-signed certs needs mod
https://stackoverflow.com/questions/43665243/invalid-self-signed-ssl-cert-subject-alternative-name-missing
1. set a file v3.ext
```
authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = %%DOMAIN%%
```
2. openssl req -new -key key.pem -out csr.pem -sha256 -extfile v3.ext