PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:
时间: 2023-10-17 13:29:43 浏览: 173
PKIX path building failed
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException是一个常见的SSL握手错误。它表示在构建证书路径时出现了问题,导致SSL握手失败。
解决这个问题的方法有几种。一种是手动导入证书到本地的信任库,这需要按照一些复杂的教程进行操作。另一种方法是信任SSL证书,这可以通过在项目中设置一些参数来实现。具体来说,在使用腾讯云接入短信SDK时,可以在Maven设置参数中加入"-Dmaven.wagon.http.ssl.insecure=true"和"-Dmaven.wagon.http.ssl.allowall=true"的参数。这样设置后,就会忽略SSL证书的认证,从而解决这个错误。需要注意的是,对于新的项目,每次都需要添加这个参数才能避免错误的发生。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [InstallCert.java工具及使用方法.zip](https://download.csdn.net/download/asdfdg/11443932)[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^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [解决PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException](https://blog.csdn.net/qq_44900959/article/details/106417142)[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^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文