mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
sslutil: remove redundant check of sslsocket.cipher()
We are doing this check in both wrapsocket() and validatesocket(). The check was added to the validator in 8f98f4f9ff93 and the commit message justifies the redundancy with a "might." The check in wrapsocket() was added in 102733a3c3e1, which appears to be part of the same series. I'm going to argue the redundancy isn't needed. I choose to keep the check in wrapsocket() because it is working around a bug in Python's wrap_socket() and I feel the check for the bug should live next to the function call exhibiting the bug.
This commit is contained in:
parent
6fd76860b1
commit
accb96048e
@ -299,8 +299,6 @@ def validatesocket(sock, strict=False):
|
||||
host = sock._hgstate['hostname']
|
||||
ui = sock._hgstate['ui']
|
||||
|
||||
if not sock.cipher(): # work around http://bugs.python.org/issue13721
|
||||
raise error.Abort(_('%s ssl connection error') % host)
|
||||
try:
|
||||
peercert = sock.getpeercert(True)
|
||||
peercert2 = sock.getpeercert()
|
||||
|
Loading…
Reference in New Issue
Block a user