Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix SSL3 error on Ubuntu 12.04 #127

Closed
wants to merge 1 commit into from

2 participants

@Schwanksta

Apologies if this is another fix for the same problem: #109. If that takes care of it, then by all means close this and merge that instead. I'm just trying to get stuff working on Ubuntu without resorting to pulling a fork :)

@shazow
Owner

Hmm sorry for the delays, I'll try to get #109 merged in soon. :) Please ping it if it doesn't happen in a reasonable amount of time.

@shazow shazow closed this
@Schwanksta

@shazow will do. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 13, 2012
  1. @Schwanksta
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 3 deletions.
  1. +10 −3 urllib3/connectionpool.py
View
13 urllib3/connectionpool.py
@@ -97,9 +97,16 @@ def connect(self):
# Wrap socket using verification with the root certs in
# trusted_root_certs
- self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file,
- cert_reqs=self.cert_reqs,
- ca_certs=self.ca_certs)
+ try:
+ self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file,
+ cert_reqs=self.cert_reqs,
+ ca_certs=self.ca_certs,
+ ssl_version=ssl.PROTOCOL_SSLv3)
+ except ssl.SSLError:
+ self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file,
+ cert_reqs=self.cert_reqs,
+ ca_certs=self.ca_certs,
+ ssl_version=ssl.PROTOCOL_SSLv23)
if self.ca_certs:
match_hostname(self.sock.getpeercert(), self.host)
Something went wrong with that request. Please try again.