Skip to content
Myr

Merge pull request #799 from joequery/ubuntu_ssl_error

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix SSL3 error on Ubuntu 12.04

authored by Kenneth Reitz · committed by Kenneth Reitz · parents b130b98, c19650b · Browse files · 1 file+11 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+11 added−3 removed

  • other:+11 added−3 removed

1 file+11 added−3 removed

modified:requests/packages/urllib3/connectionpool.py+11 added-3 removed
94 unmodified lines
95 sock = socket.create_connection((self.host, self.port), self.timeout)9697 # Wrap socket using verification with the root certs in98 # trusted_root_certs99 try:99 self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file,100 cert_reqs=self.cert_reqs,101 ca_certs=self.ca_certs)100 self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file,101 cert_reqs=self.cert_reqs,102 ca_certs=self.ca_certs,103 ssl_version=ssl.PROTOCOL_SSLv3)104 except ssl.SSLError:105 self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file,106 cert_reqs=self.cert_reqs,107 ca_certs=self.ca_certs,108 ssl_version=ssl.PROTOCOL_SSLv23)109110 if self.ca_certs:111 match_hostname(self.sock.getpeercert(), self.host)112113
457 unmodified lines