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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/tlslite/tlslite/tlsrecordlayer.py
diff --git a/third_party/tlslite/tlslite/tlsrecordlayer.py b/third_party/tlslite/tlslite/tlsrecordlayer.py
index c3bcd8c40ca64a12e426bc1f23ff3eff3d0305b4..8faea59eaa8c20c7ab163080a189f402dca61161 100644
--- a/third_party/tlslite/tlslite/tlsrecordlayer.py
+++ b/third_party/tlslite/tlslite/tlsrecordlayer.py
@@ -115,6 +115,9 @@ class TLSRecordLayer(object):
self.clearReadBuffer()
self.clearWriteBuffer()
+ #All handshake messages, for use in extended master secret
+ self.handshakeMessages = []
davidben 2015/08/14 22:31:18 You should be able to just use the handshake diges
nharper 2015/08/15 00:37:43 Ah, I should have read the surrounding code and se
+
#Handshake digests
self._handshake_md5 = hashlib.md5()
self._handshake_sha = hashlib.sha1()
@@ -558,6 +561,7 @@ class TLSRecordLayer(object):
yield result
b = msg.write()
+ self.handshakeMessages.append(b)
# If a 1-byte message was passed in, and we "split" the
# first(only) byte off above, we may have a 0-length msg:
@@ -814,6 +818,7 @@ class TLSRecordLayer(object):
self._handshake_md5.update(compat26Str(p.bytes))
self._handshake_sha.update(compat26Str(p.bytes))
self._handshake_sha256.update(compat26Str(p.bytes))
+ self.handshakeMessages.append(p.bytes)
#Parse based on handshake type
if subType == HandshakeType.client_hello:
« third_party/tlslite/tlslite/constants.py ('K') | « third_party/tlslite/tlslite/tlsconnection.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698