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

Side by Side Diff: third_party/tlslite/patches/disable_channel_id.patch

Issue 1339193002: Add flag to tlslite's HandshakeSettings to disable channel ID on the test server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use correct diffbase Created 5 years, 3 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
« no previous file with comments | « third_party/tlslite/README.chromium ('k') | third_party/tlslite/tlslite/handshakesettings.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 diff --git a/third_party/tlslite/tlslite/handshakesettings.py b/third_party/tlsl ite/tlslite/handshakesettings.py
davidben 2015/09/15 15:51:06 [Did not review; assuming this matches the CL.]
2 index 8f25f62..d7be5b3 100644
3 --- a/third_party/tlslite/tlslite/handshakesettings.py
4 +++ b/third_party/tlslite/tlslite/handshakesettings.py
5 @@ -112,6 +112,9 @@ class HandshakeSettings(object):
6 @ivar alertAfterHandshake: If true, the server will send a fatal
7 alert immediately after the handshake completes.
8
9 + @type enableChannelID: bool
10 + @ivar enableChannelID: If true, the server supports channel ID.
11 +
12 @type enableExtendedMasterSecret: bool
13 @ivar enableExtendedMasterSecret: If true, the server supports the extended
14 master secret TLS extension and will negotiated it with supporting clients.
15 @@ -140,6 +143,7 @@ class HandshakeSettings(object):
16 self.tlsIntoleranceType = 'alert'
17 self.useExperimentalTackExtension = False
18 self.alertAfterHandshake = False
19 + self.enableChannelID = True
20 self.enableExtendedMasterSecret = True
21 self.supportedTokenBindingParams = []
22
23 @@ -159,6 +163,7 @@ class HandshakeSettings(object):
24 other.tlsIntolerant = self.tlsIntolerant
25 other.tlsIntoleranceType = self.tlsIntoleranceType
26 other.alertAfterHandshake = self.alertAfterHandshake
27 + other.enableChannelID = self.enableChannelID
28 other.enableExtendedMasterSecret = self.enableExtendedMasterSecret
29 other.supportedTokenBindingParams = self.supportedTokenBindingParams
30
31 diff --git a/third_party/tlslite/tlslite/tlsconnection.py b/third_party/tlslite/ tlslite/tlsconnection.py
32 index 06404fe..7363a30 100644
33 --- a/third_party/tlslite/tlslite/tlsconnection.py
34 +++ b/third_party/tlslite/tlslite/tlsconnection.py
35 @@ -1326,7 +1326,8 @@ class TLSConnection(TLSRecordLayer):
36 serverHello.create(self.version, getRandomBytes(32), sessionID, \
37 cipherSuite, CertificateType.x509, tackExt,
38 nextProtos)
39 - serverHello.channel_id = clientHello.channel_id
40 + serverHello.channel_id = \
41 + clientHello.channel_id and settings.enableChannelID
42 serverHello.extended_master_secret = \
43 clientHello.extended_master_secret and \
44 settings.enableExtendedMasterSecret
45 @@ -1391,7 +1392,7 @@ class TLSConnection(TLSRecordLayer):
46 for result in self._serverFinished(premasterSecret,
47 clientHello.random, serverHello.random,
48 cipherSuite, settings.cipherImplementations,
49 - nextProtos, clientHello.channel_id,
50 + nextProtos, serverHello.channel_id,
51 serverHello.extended_master_secret):
52 if result in (0,1): yield result
53 else: break
OLDNEW
« no previous file with comments | « third_party/tlslite/README.chromium ('k') | third_party/tlslite/tlslite/handshakesettings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698