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

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

Issue 1283373002: Implement extended master secret in tlslite (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused code; add setting to HandshakeSettings Created 5 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
OLDNEW
1 # Authors: 1 # Authors:
2 # Trevor Perrin 2 # Trevor Perrin
3 # Google (adapted by Sam Rushing) - NPN support 3 # Google (adapted by Sam Rushing) - NPN support
4 # Martin von Loewis - python 3 port 4 # Martin von Loewis - python 3 port
5 # Yngve Pettersen (ported by Paul Sokolovsky) - TLS 1.2 5 # Yngve Pettersen (ported by Paul Sokolovsky) - TLS 1.2
6 # 6 #
7 # See the LICENSE file for legal information regarding use of this file. 7 # See the LICENSE file for legal information regarding use of this file.
8 8
9 """Helper class for TLSConnection.""" 9 """Helper class for TLSConnection."""
10 from __future__ import generators 10 from __future__ import generators
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 imac_md5.update(compatHMAC(label + masterSecret + bytearray([0x36]*48))) 1249 imac_md5.update(compatHMAC(label + masterSecret + bytearray([0x36]*48)))
1250 imac_sha.update(compatHMAC(label + masterSecret + bytearray([0x36]*40))) 1250 imac_sha.update(compatHMAC(label + masterSecret + bytearray([0x36]*40)))
1251 1251
1252 md5Bytes = MD5(masterSecret + bytearray([0x5c]*48) + \ 1252 md5Bytes = MD5(masterSecret + bytearray([0x5c]*48) + \
1253 bytearray(imac_md5.digest())) 1253 bytearray(imac_md5.digest()))
1254 shaBytes = SHA1(masterSecret + bytearray([0x5c]*40) + \ 1254 shaBytes = SHA1(masterSecret + bytearray([0x5c]*40) + \
1255 bytearray(imac_sha.digest())) 1255 bytearray(imac_sha.digest()))
1256 1256
1257 return md5Bytes + shaBytes 1257 return md5Bytes + shaBytes
1258 1258
1259 def _getHandshakeHash(self):
1260 if self.version in ((3,1), (3,2)):
1261 return self._handshake_md5.digest() + \
1262 self._handshake_sha.digest()
1263 elif self.version == (3,3):
1264 return self._handshake_sha256.digest()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698