请求 - SSLV3警报握手失败

时间:2017-08-31 11:30:43

标签: python python-3.x python-requests

我正在使用请求库来测试对网络的API调用。 我从requestb.in创建了一个API,但是当我调用该URL时,它会出现以下错误。

requests.exceptions.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:600)

但是当我打电话给google.com时,我会得到200回复​​。 这些是来自AWS Ubuntu实例的结果。从我的笔记本电脑中我得到200两个。 似乎问题可能是CA在AWS实例中没有被授权?

修改

openssl s_client -connect requestb.in:443
CONNECTED(00000003)
140678254999192:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:s23_clnt.c:769:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 7 bytes and written 307 bytes
---

适用于Google.com

xuryax@Shaurya-Z510:/etc/ssl/certs$ openssl s_client -connect google.com:443
CONNECTED(00000003)
depth=3 C = US, O = Equifax, OU = Equifax Secure Certificate Authority
verify return:1
depth=2 C = US, O = GeoTrust Inc., CN = GeoTrust Global CA
verify return:1
depth=1 C = US, O = Google Inc, CN = Google Internet Authority G2
verify return:1
depth=0 C = US, ST = California, L = Mountain View, O = Google Inc, CN = *.google.com
verify return:1
---
Certificate chain
 0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=*.google.com
   i:/C=US/O=Google Inc/CN=Google Internet Authority G2
 1 s:/C=US/O=Google Inc/CN=Google Internet Authority G2
   i:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
 2 s:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
   i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority
---

我的服务器也有类似的结果。我可以看到sslv3握手也在我的笔记本电脑中通过openssl失败了。所以我想,我的笔记本电脑上可能会禁用某种证书检查。

我该如何解决这个问题?

0 个答案:

没有答案
相关问题