【发布时间】:2018-06-19 12:08:14
【问题描述】:
错误:
javax.net.ssl.SSLException: Certificate for <localhost> doesn't match any of the subject alternative names: [xxxxxxx.xxx.xxxxxx.xxx]
我的 localhost 中有一个 Spring Boot 应用程序正在运行。我还有一条通过油灰到服务器的隧道ssh。
我做过的事情:
- 我手动创建/导入了各种方式的密钥/证书。
- 我使用 keytool 中的 -ext 将 dns 地址和 localhost 添加到 SAN。
- 我还使用了openSource java 文件来安装证书。
- 我将 hosts 文件更改为:127.0.0.1 xxx.xxx.xxxxxxx.xxx(如果我 ping dns 名称,它会响应 localhost 地址)
- 我使用 VM Arguments -Djavax.net.debug=ssl 检查证书是否正确加载。
我错过了什么?顺便说一句,我也在使用 VPN。
【问题讨论】:
标签: spring-boot ssl-certificate