onvno / pokerface

日常技术文章阅读整理
3 stars 0 forks source link

20200317 - https #89

Open onvno opened 4 years ago

onvno commented 4 years ago

本地起https

使用http-server:

$ openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
$ http-server -S -C cert.pem
onvno commented 4 years ago

本地HTTPS,Chrome警告处理

经过大量的谷歌搜索,我发现本地证书被拒绝的原因是Chrome不支持证书中的commonName匹配,实际上从2017年1月起就要求使用subjectAltName。