SSLError:sslv3 警报握手失败 [英] SSLError: sslv3 alert handshake failure

查看:46
本文介绍了SSLError:sslv3 警报握手失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在对 branch.io 进行以下调用

I'm making the following call to branch.io

import requests
req = requests.get('https://bnc.lt/m/H3XKyKB3Tq', verify=False)

它在我的本地机器上运行良好,但在服务器上失败.

It works fine in my local machine but fails in the server.

SSLError: [Errno 1] _ssl.c:504: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

Openssl 版本:

本地:OpenSSL 0.9.8zg 2015 年 7 月 14 日

local: OpenSSL 0.9.8zg 14 July 2015

服务器:OpenSSL 0.9.8e-fips-rhel5 2008 年 7 月 1 日

server: OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008

Python:

本地:2.7.10服务器:2.7.6

local: 2.7.10 server: 2.7.6

分支io服务器连接:

Chrome 已验证 DigiCert SHA2 安全服务器 CA 颁发了该网站的证书.服务器未提供任何证书透明度信息.

Chrome verified that DigiCert SHA2 Secure Server CA issued this website's certificate. The server did not supply any Certificate Transparency information.

我试过 urllib2,但结果是一样的.有什么帮助吗?

I tried urllib2, but the result was same. Any help?

推荐答案

Jyo de Lys 已确定问题.问题描述 这里,解决方案是这里.我做了以下工作以使其正常工作:

Jyo de Lys has identified the problem. The problem is described here and the solution is here. I did the following to get this working:

  1. easy_install pyOpenSSL
  2. easy_install ndg-httpsclient
  3. easy_install pyasn1

如果您在使用 urllib2 时遇到此错误,您也需要升级到 python 2.7.9 或更高版本.

If you're getting this error while using urllib2, you'll need to upgrade to python 2.7.9 or later too.

这篇关于SSLError:sslv3 警报握手失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆