- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试使用 Java Http 客户端连接到服务器以进行 Web 服务调用。如果我用下面的代码打开网络调试..
System.setProperty("javax.net.debug", "all");
我看到来自 Entrust 的证书似乎被添加为受信任的证书。添加的内容如下...
adding as trusted cert:
Subject: CN=Entrust.net Certification Authority (2048), OU=(c) 1999 Entrust.net Limited, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), O=Entrust.net
Issuer: CN=Entrust.net Certification Authority (2048), OU=(c) 1999 Entrust.net Limited, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), O=Entrust.net
Algorithm: RSA; Serial number: 0x3863def8
Valid from Fri Dec 24 12:50:51 EST 1999 until Tue Jul 24 10:15:12 EDT 2029
似乎服务器正在使用来自 Entrust 的证书,因为我也在调试中看到...
main, READ: TLSv1 Handshake, length = 2649
*** Certificate chain
chain [0] = [0] Version: 3
SerialNumber: 1356119177
IssuerDN: C=US,O=Entrust\, Inc.,OU=See www.entrust.net/legal-terms,OU=(c) 2012 Entrust\, Inc. - for authorized use only,CN=Entrust Certification Authority - L1K
Start Date: Wed Jul 15 11:50:20 EDT 2015
Final Date: Sun Jul 15 18:27:04 EDT 2018
然而在握手过程中我得到以下异常...
***
Caught: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException:
PKIX path building failed: java.security.cert.CertPathBuilderException:
No issuer certificate for certificate in certification path found.
main, SEND TLSv1 ALERT: fatal, description = certificate_unknown
最佳答案
我能够通过将服务器证书添加到我的 java 客户端(jre 的 cacerts 和 jssecacerts)来解决这个问题。
如果我们以这种方式向 java 客户端添加证书,我们就要求我们的 jre 信任该服务器的证书。
echo | openssl s_client -showcerts -connect www.xyz.com:443 2>&1 |
sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/cert.pem
#cacerts
keytool -import -alias certname -file /tmp/cert.pem -keystore
/usr/java/jdk1.8.0_45/jre/lib/security/cacerts -storepass changeit
#jssecacerts(Normally we remove this file)
keytool -import -alias certname -file /tmp/cert.pem -keystore
/usr/java/jdk1.8.0_45/jre/lib/security/jssecacerts -storepass changeit
如果这段客户端代码是通过应用服务器执行的,请重启您的应用服务器。
确保您在环境变量中有 openssl, keytool 并更改您各自的 JAVA_HOME 位置。
关于java - 为什么我会收到已知和受信任证书的 "No issuer certificate for certificate in certification path found"错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40162500/
运行 ANT 脚本目标时出现以下错误。错误消息显示“服务器证书验证失败”。请帮助如何消除这个问题。我在 Windows XP 中工作。 C:\apache-ant-1.8.1>ant checkout
在钥匙串(keychain)中,我的证书显示为无效颁发者。 虽然我有正确的“应用全局开发者关系证书颁发机构”,该证书将于 2023 年到期。 我多次尝试这些链接但没有成功 This certifica
我的问题的简短版本是:如何访问从第 3 方应用程序同步的联系人的电话号码? 这是长版: 我可以很容易地访问常规的 Android 联系人。问题是当联系人列表中的唯一信息与 Facebook 或 Lin
我有一个简单的 web api 项目,它看起来像这样: [Authorize] [Route("Get")] public ActionResult SayHello(
Webpack 的 Rule 选项 presents two things (完整语法,而非快捷语法):resource 和 issuer。 In a Rule the properties test
我正在 Windows 上开发一个应连接到服务器的应用程序。因此我实现了一个 QSslSocket。 执行连接方法后,sslSocket errorString 发送 The issuer certi
我们正在升级我们自己和合作伙伴之间的连接,他们要求我们升级到 MTLS。我一直在调试低级 java, javax.net.debug=all我可以看到握手成功。然而,合作伙伴对主题和发行人字段进行了完
我目前正在使用证书在我的本地 Windows 计算机上的命令行中执行一个使用 curl 的 php 脚本来测试网站上的 API。但是脚本永远无法到达服务器。我已经为这个明显常见的错误查找了解决方案,并
curl -L https://get.rvm.io | bash -s stable --ruby 当我尝试这个时,我得到了这个,我认为我的 openssl 坏了, % Total % Receiv
我有一个本地 gitlab,我试图在其中运行一些构建/管道,但出现以下错误 - fatal: unable to access 'https://gitlab-ci-token:[MASKED]@gi
尝试开发并部署到 Firebase 托管,但当我从 PowerShell 运行 firebase init 时收到以下错误消息: 服务器错误。无法获取本地颁发者证书 有人知道这个吗?这是日志文件内容:
我有我的 groovy 脚本来在 azure 应用服务上部署一个简单的 api(nodejs)。 pipeline { agent none environment { //app servi
我刚刚使用 HAProxy 1.5.2 设置了一个负载均衡器,但 HTTPS 前端无法正常工作。 我使用 curl 向我的服务器发出如下请求: curl https://haproxy.example
当我启用 CURLOPT_SSL_VERIFYPEER 时,我从 curl 得到了这个错误:SSL 证书问题:无法获取本地颁发者证书。 我读到我应该在 php.ini 文件中包含一些内容,但我无权访问
我正在尝试在 iOS 上使用 curl 设置与 HTTPS 服务器的安全连接(应用程序是用 C++ 编写的) 我发现我需要为 CURLOPT_CAPATH 选项设置 cacert.pam ( http
这个问题在这里已经有了答案: This certificate has an invalid issuer Apple Push Services (14 个答案) 关闭 6 年前。 编辑: 我们发
我使用的是 OSX:10.12.4 我最初能够毫无问题地使用 git、homebrew 和 curl。我不记得我做了什么导致它,但突然间这些 SSL 错误开始出现在我的 git 命令中。 我在运行任何
这个问题在这里已经有了答案: This certificate has an invalid issuer Apple Push Services (14 个答案) 关闭 6 年前。 钥匙串(key
我正在尝试使用 python 从网络获取数据。我为其导入了 urllib.request 包,但在执行时出现错误: certificate verify failed: unable to get l
我正在尝试在 gitLab 中推送我的第一个项目,但出现此错误“fatal: unable to access 'https://.git.: SSL certificate problem: una
我是一名优秀的程序员,十分优秀!