相关疑难解决方法(0)

<localhost> 的证书与任何主题备用名称都不匹配

错误

javax.net.ssl.SSLException: Certificate for <localhost> doesn't match any of the subject alternative names: [xxxxxxx.xxx.xxxxxx.xxx]
Run Code Online (Sandbox Code Playgroud)

我的localhost. 我也有一个ssh通过腻子到服务器的隧道。

我做过的事情:

  • 我手动创建/导入了所有方式的密钥/证书。
  • 我使用 keytool 中的 -ext 将 dns addr 和 localhost 添加到 SAN。
  • 我还使用了一个 开源java 文件来安装证书。
  • 我将主机文件更改为:127.0.0.1 xxx.xxx.xxxxxxx.xxx(如果我 ping dns 名称,它会响应本地主机地址)
  • 我使用 VM Arguments -Djavax.net.debug=ssl 来检查证书是否正确加载。

我错过了什么?顺便说一句,我也在使用 VPN。

ssl-certificate spring-boot

14
推荐指数
1
解决办法
3万
查看次数

标签 统计

spring-boot ×1

ssl-certificate ×1