php - 尽管安装了根证书但握手失败(PayPal 升级 - g5 证书 - openssl)

标签 php ssl curl paypal

我有(由于多种原因无法升级)多个运行 Centos 5.11 的虚拟机

作为验证机器是否与此处描述的新 PayPal 更新兼容的检查: https://www.paypal-knowledge.com/infocenter/index?page=content&widgetview=true&id=FAQ1766&viewlocale=en_US

我在 shell 中运行了它:

grep -C 5  --color=always "VeriSign Class 3 Public Primary Certification Authority - G5" /etc/pki/tls/certs/ca-bundle.crt

一切看起来都很好,这是输出:

Data: Version: 3 (0x2) Serial Number: 18:da:d1:9e:26:7d:e8:bb:4a:21:58:cd:cc:6b:3b:4a Signature Algorithm: sha1WithRSAEncryption Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 2006 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary Certification Authority - G5 Validity Not Before: Nov 8 00:00:00 2006 GMT Not After : Jul 16 23:59:59 2036 GMT Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 2006 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary Certification Authority - G5 Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: 00:af:24:08:08:29:7a:35:9e:60:0c:aa:e7:4b:3b:

对我来说,这意味着新的必需 G5 根证书实际上就在那里。 但是,当针对沙箱进行测试时,沙箱应该已经使用此命令使用新规范:

openssl s_client -connect api-3t.sandbox.paypal.com:443 -showcerts

响应是:

CONNECTED(00000003)
2052:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:s23_clnt.c:586:

当然,在非沙盒链接上执行相同操作时没有问题。

我 101% 被困在这里。证书在那里,但我仍然失败? 安装的 Openssl(以及通过官方 repo 的最新版本)是 openssl-0.9.8e-40.el5_11。

我看到了其他几个关于握手问题的问题,但它们似乎都没有解决这样的问题(证书到位但仍然存在连接问题)。

知道为什么会这样吗?

编辑: 通过还尝试以这种方式调用 ssl3:

openssl s_client -ssl3 -connect api-3t.sandbox.paypal.com:443 -showcerts

我得到这个:

CONNECTED(00000003)
6064:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1092:SSL alert number 40
6064:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:s3_pkt.c:536:

最佳答案

openssl-0.9.8e-40.el5_11.

Paypal 要求您支持 TLS 1.2。自 4 年前发布的 OpenSSL 版本 1.0.1 以来,仅支持 TLS 1.2。并且由于您的旧版本 OpenSSL 不支持 TLS 1.2,但最多支持 TLS 1.0,您会收到握手错误。这与证书无关。

关于php - 尽管安装了根证书但握手失败(PayPal 升级 - g5 证书 - openssl),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37808947/

相关文章:

java - java的cacerts格式应该是什么格式?

visual-studio-2008 - 如何访问iframe中页面中的字段?

php - cURL 错误 : Cannot connect: SSL is disabled. 错误编号 35

php - mySQL 语句的第一个词不能是 DELETE 或 UPDATE

php - 配置 Facebook 点赞按钮

php - 如何从 Controller 中的函数返回多个变量

php - (mysql)我需要什么类型的编码来存储这种字符

MongoDB 服务器接受服务器证书作为客户端证书

curl - Docker容器无法使用主机名访问另一个容器

php - curl_exec 在我不想时打印结果