net::ERR_CERT_COMMON_NAME_INVALID
时间: 2023-08-05 20:07:15 浏览: 282
ACE_OS::mktime函数源代码
3星 · 编辑精心推荐
回答: 当出现net::ERR_CERT_COMMON_NAME_INVALID错误时,通常是因为证书中缺少SubjectAltName字段。这个字段可以通过在生成证书时添加备用名称(subjectAltName)扩展字段来解决。你可以使用openssl命令来添加subjectAltName扩展。首先创建一个名为ext.ini的文件,然后在文件中填入以下内容:
```
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names
\[alt_names\]
DNS.1 = *.dyxmq.cn
DNS.2 = *.maqian.xin
DNS.3 = *.maqian.io
DNS.4 = *.maqian.co
DNS.5 = *.maqian.cn
```
在生成证书时,使用这个ext.ini文件来添加subjectAltName扩展字段。这样就可以解决net::ERR_CERT_COMMON_NAME_INVALID错误了。\[1\]\[3\]
#### 引用[.reference_title]
- *1* [HTTPS调试中自签名证书错误ERR_CERT_COMMON_NAME_INVALID的解决方法](https://blog.csdn.net/jiuaiwo1314/article/details/114241152)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [Chrome NET::ERR_CERT_COMMON_NAME_INVALID问题解决方案](https://blog.csdn.net/Allocator/article/details/122054311)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文