Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: third_party/tlslite/tlslite/tlsconnection.py

Issue 418553003: Implement TLS_FALLBACK_SCSV for SSLClientSocketOpenSSL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/tlslite/patches/fallback_scsv.patch ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Authors: 1 # Authors:
2 # Trevor Perrin 2 # Trevor Perrin
3 # Google - added reqCAs parameter 3 # Google - added reqCAs parameter
4 # Google (adapted by Sam Rushing and Marcelo Fernandez) - NPN support 4 # Google (adapted by Sam Rushing and Marcelo Fernandez) - NPN support
5 # Dimitris Moraitis - Anon ciphersuites 5 # Dimitris Moraitis - Anon ciphersuites
6 # Martin von Loewis - python 3 port 6 # Martin von Loewis - python 3 port
7 # 7 #
8 # See the LICENSE file for legal information regarding use of this file. 8 # See the LICENSE file for legal information regarding use of this file.
9 9
10 """ 10 """
(...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after
1421 else: 1421 else:
1422 raise ValueError("Unknown intolerance type: '%s'" % 1422 raise ValueError("Unknown intolerance type: '%s'" %
1423 settings.tlsIntoleranceType) 1423 settings.tlsIntoleranceType)
1424 1424
1425 #If client's version is too high, propose my highest version 1425 #If client's version is too high, propose my highest version
1426 elif clientHello.client_version > settings.maxVersion: 1426 elif clientHello.client_version > settings.maxVersion:
1427 self.version = settings.maxVersion 1427 self.version = settings.maxVersion
1428 1428
1429 #Detect if the client performed an inappropriate fallback. 1429 #Detect if the client performed an inappropriate fallback.
1430 elif fallbackSCSV and clientHello.client_version < settings.maxVersion: 1430 elif fallbackSCSV and clientHello.client_version < settings.maxVersion:
1431 self.version = clientHello.client_version
1431 if CipherSuite.TLS_FALLBACK_SCSV in clientHello.cipher_suites: 1432 if CipherSuite.TLS_FALLBACK_SCSV in clientHello.cipher_suites:
1432 for result in self._sendError(\ 1433 for result in self._sendError(\
1433 AlertDescription.inappropriate_fallback): 1434 AlertDescription.inappropriate_fallback):
1434 yield result 1435 yield result
1435 1436
1436 else: 1437 else:
1437 #Set the version to the client's version 1438 #Set the version to the client's version
1438 self.version = clientHello.client_version 1439 self.version = clientHello.client_version
1439 1440
1440 #If resumption was requested and we have a session cache... 1441 #If resumption was requested and we have a session cache...
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1928 except TLSAlert as alert: 1929 except TLSAlert as alert:
1929 if not self.fault: 1930 if not self.fault:
1930 raise 1931 raise
1931 if alert.description not in Fault.faultAlerts[self.fault]: 1932 if alert.description not in Fault.faultAlerts[self.fault]:
1932 raise TLSFaultError(str(alert)) 1933 raise TLSFaultError(str(alert))
1933 else: 1934 else:
1934 pass 1935 pass
1935 except: 1936 except:
1936 self._shutdown(False) 1937 self._shutdown(False)
1937 raise 1938 raise
OLDNEW
« no previous file with comments | « third_party/tlslite/patches/fallback_scsv.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698