I want to select the transport layer protocol used to open https links using urllib2.urlopen () in Python 2.7
Similar to what we can do with the openssl utility:
openssl s_client -connect www.google.com:443 -ssl2 openssl s_client -connect www.google.com:443 -ssl3 openssl s_client -connect www.google.com:443 -tls1
The motive is to not use the ssl2 protocol, which leads to handshake problems on most servers. urllib2 seems to be using SSLv23, which uses SSLv2 or SSLv3 with some kind of reduction mechanism. There are times when this leads to problems with a handshake.
source share