Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add support for SNI in python 2.7

Tags:

python

sni

An api from some website supports SNI(Server Name Indication). But it also reminds me that SNI is only support after python 3.4. However, I currently use python 2.7 and have no intention to upgrade to python3.4 yet.

Is there any solution to use SNI with python 2.7? Detailed explaination and examples are highly appreciated.

like image 886
Deep_fox Avatar asked Oct 17 '25 23:10

Deep_fox


1 Answers

Many network security features, including SNI support, were backported from Python 3.4 and released in Python 2.7.9. See https://docs.python.org/2/whatsnew/2.7.html#pep-466-network-security-enhancements-for-python-2-7

like image 61
Ned Deily Avatar answered Oct 19 '25 13:10

Ned Deily