San*_*wal 9 java email email-integration amazon-web-services mailgun
我使用mailgun发送电子邮件,但从上一天它在电子邮件发送api的POST请求期间显示错误,如下所示.我正在使用java/spring/AWS到我的网络应用程序.我试图重新启动应用程序并检查证书是否已经存在信任存储但我们从未生成信任存储密钥.
com.mashape.unirest.http.exceptions.UnirestException:javax.net.ssl.SSLHandshakeException:sun.security.validator.ValidatorException:PKIX路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到有效的证书路径在com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:143)请求目标com.mashape.unirest.request.BaseRequest.asJson(BaseRequest.java:68)
小智 18
在1月22日,由于Symantec的PKI基础设施设置为不可信,我们更新了SSL证书.某些旧版本的Java没有"DigiCert Global Root G2"CA.
有几种选择:
要导入"DigiCert Global Root G2",您可以从https://www.digicert.com/digicert-root-certificates.htm下载根目录.确保您正在下载正确的根证书.
下载证书后,您需要使用以下命令将其导入:
keytool -import -trustcacerts -keystore /path/to/cacerts -storepass changeit -noprompt -alias digicert-global-root-g2 -file /path/to/digicert.crt
Run Code Online (Sandbox Code Playgroud)
您需要设置Java Keystore的路径以及下载的根证书的位置.