mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
httpclient: update to revision 9517a2b56fe9 of httpplus (issue3905)
Includes upstream change "socketutil: force SSLv3 by default, as it is safer" which should fix issue 3905.
This commit is contained in:
parent
c8819014d3
commit
dfecda13f3
@ -622,6 +622,8 @@ class HTTPConnection(object):
|
||||
# TODO: find a way to block on ssl flushing its buffer
|
||||
# similar to selecting on a raw socket.
|
||||
continue
|
||||
if e[0] == errno.EWOULDBLOCK or e[0] == errno.EAGAIN:
|
||||
continue
|
||||
elif (e[0] not in (errno.ECONNRESET, errno.EPIPE)
|
||||
and not first):
|
||||
raise
|
||||
|
@ -106,7 +106,7 @@ else:
|
||||
else:
|
||||
raise x
|
||||
|
||||
_PROTOCOL_SSLv23 = 2
|
||||
_PROTOCOL_SSLv3 = 1
|
||||
|
||||
CERT_NONE = 0
|
||||
CERT_OPTIONAL = 1
|
||||
@ -118,7 +118,7 @@ else:
|
||||
# pylint: disable=W0613,R0913
|
||||
def wrap_socket(sock, keyfile=None, certfile=None,
|
||||
server_side=False, cert_reqs=CERT_NONE,
|
||||
ssl_version=_PROTOCOL_SSLv23, ca_certs=None,
|
||||
ssl_version=_PROTOCOL_SSLv3, ca_certs=None,
|
||||
do_handshake_on_connect=True,
|
||||
suppress_ragged_eofs=True):
|
||||
"""Backport of ssl.wrap_socket from Python 2.6."""
|
||||
|
Loading…
Reference in New Issue
Block a user