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

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

Issue 263213005: Move channel id tests up from OpenSSL and update channelid version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
OLDNEW
1 diff --git a/third_party/tlslite/tlslite/constants.py b/third_party/tlslite/tlsl ite/constants.py 1 diff --git a/third_party/tlslite/tlslite/constants.py b/third_party/tlslite/tlsl ite/constants.py
2 index d52e596..79ad145 100755 2 index d52e596..79ad145 100755
3 --- a/third_party/tlslite/tlslite/constants.py 3 --- a/third_party/tlslite/tlslite/constants.py
4 +++ b/third_party/tlslite/tlslite/constants.py 4 +++ b/third_party/tlslite/tlslite/constants.py
5 @@ -31,6 +31,7 @@ class HandshakeType: 5 @@ -31,6 +31,7 @@ class HandshakeType:
6 client_key_exchange = 16 6 client_key_exchange = 16
7 finished = 20 7 finished = 20
8 next_protocol = 67 8 next_protocol = 67
9 + encrypted_extensions = 203 9 + encrypted_extensions = 203
10 10
11 class ContentType: 11 class ContentType:
12 change_cipher_spec = 20 12 change_cipher_spec = 20
13 @@ -45,6 +46,7 @@ class ExtensionType: # RFC 6066 / 4366 13 @@ -45,6 +46,7 @@ class ExtensionType: # RFC 6066 / 4366
14 cert_type = 9 # RFC 6091 14 cert_type = 9 # RFC 6091
15 tack = 0xF300 15 tack = 0xF300
16 supports_npn = 13172 16 supports_npn = 13172
17 + channel_id = 30031 17 + channel_id = 30032
18 18
19 class NameType: 19 class NameType:
20 host_name = 0 20 host_name = 0
21 diff --git a/third_party/tlslite/tlslite/messages.py b/third_party/tlslite/tlsli te/messages.py 21 diff --git a/third_party/tlslite/tlslite/messages.py b/third_party/tlslite/tlsli te/messages.py
22 index 7ef4e3f..246082e 100755 22 index 7ef4e3f..246082e 100755
23 --- a/third_party/tlslite/tlslite/messages.py 23 --- a/third_party/tlslite/tlslite/messages.py
24 +++ b/third_party/tlslite/tlslite/messages.py 24 +++ b/third_party/tlslite/tlslite/messages.py
25 @@ -112,6 +112,7 @@ class ClientHello(HandshakeMsg): 25 @@ -112,6 +112,7 @@ class ClientHello(HandshakeMsg):
26 self.tack = False 26 self.tack = False
27 self.supports_npn = False 27 self.supports_npn = False
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 + #Server Finish - Are we waiting for a EncryptedExtensions? 144 + #Server Finish - Are we waiting for a EncryptedExtensions?
145 + if expect_channel_id: 145 + if expect_channel_id:
146 + for result in self._getMsg(ContentType.handshake, HandshakeType.enc rypted_extensions): 146 + for result in self._getMsg(ContentType.handshake, HandshakeType.enc rypted_extensions):
147 + if result in (0,1): 147 + if result in (0,1):
148 + yield result 148 + yield result
149 + if result is None: 149 + if result is None:
150 + for result in self._sendError(AlertDescription.unexpected_messa ge, 150 + for result in self._sendError(AlertDescription.unexpected_messa ge,
151 + "Didn't get EncryptedExtensions me ssage"): 151 + "Didn't get EncryptedExtensions me ssage"):
152 + yield result 152 + yield result
153 + encrypted_extensions = result 153 + encrypted_extensions = result
154 + self.channel_id = result.channel_id_key 154 + self.channel_id = result.channel_id_key
wtc 2014/05/06 17:56:24 Haavard: you're right. We only record result.chann
155 + else: 155 + else:
156 + self.channel_id = None 156 + self.channel_id = None
157 + 157 +
158 #Calculate verification data 158 #Calculate verification data
159 verifyData = self._calcFinished(masterSecret, False) 159 verifyData = self._calcFinished(masterSecret, False)
160 160
161 diff --git a/third_party/tlslite/tlslite/tlsrecordlayer.py b/third_party/tlslite /tlslite/tlsrecordlayer.py 161 diff --git a/third_party/tlslite/tlslite/tlsrecordlayer.py b/third_party/tlslite /tlslite/tlsrecordlayer.py
162 index b0833fe..ff08cbf 100755 162 index b0833fe..ff08cbf 100755
163 --- a/third_party/tlslite/tlslite/tlsrecordlayer.py 163 --- a/third_party/tlslite/tlslite/tlsrecordlayer.py
164 +++ b/third_party/tlslite/tlslite/tlsrecordlayer.py 164 +++ b/third_party/tlslite/tlslite/tlsrecordlayer.py
165 @@ -800,6 +800,8 @@ class TLSRecordLayer(object): 165 @@ -800,6 +800,8 @@ class TLSRecordLayer(object):
166 yield Finished(self.version).parse(p) 166 yield Finished(self.version).parse(p)
167 elif subType == HandshakeType.next_protocol: 167 elif subType == HandshakeType.next_protocol:
168 yield NextProtocol().parse(p) 168 yield NextProtocol().parse(p)
169 + elif subType == HandshakeType.encrypted_extensions: 169 + elif subType == HandshakeType.encrypted_extensions:
170 + yield EncryptedExtensions().parse(p) 170 + yield EncryptedExtensions().parse(p)
171 else: 171 else:
172 raise AssertionError() 172 raise AssertionError()
173 173
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698