我可以在python 2中使用TLS版本1.1或1.2吗? [英] Can I use TLS version 1.1 or 1.2 in python 2?

查看:746
本文介绍了我可以在python 2中使用TLS版本1.1或1.2吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我阅读了一个文档,其中说Python 2仅具有ssl.PROTOCOL_TLSv1常量,并且在Python 3.4中添加了ssl.PROTOCOL_TLSv1_1ssl.PROTOCOL_TLSv1_2.那么如何在Python 2中使用TLS 1.1和1.2?

I read a document that says that Python 2 only has ssl.PROTOCOL_TLSv1 constant, and that ssl.PROTOCOL_TLSv1_1 and ssl.PROTOCOL_TLSv1_2 were added in Python 3.4. So how can I use TLS 1.1 and 1.2 in Python 2?

PS.我不想使用TLS 1.0,因为它具有一些安全漏洞. TLS 1.2是现在的最新版本,因此我想使我的程序仅使用TLS 1.2.如果服务器不支持TLS 1.2,则只需使连接失败即可.

PS. I don't want to use TLS 1.0 because it has some security flaws. TLS 1.2 is the newest version now, so I want to make my program use TLS 1.2 only; if the server doesn't support TLS 1.2 then just make the connection failed.

推荐答案

以我的歉意复活一个老问题,看来支持 2014年12月.

With my apologies for resurrecting an old question, it appears that support for TLS1.1 and TLS1.2 will be brought in for Python 2.7.9, scheduled for release around December 2014.

这篇关于我可以在python 2中使用TLS版本1.1或1.2吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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