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

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

Issue 210323002: Update tlslite to 0.4.6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rietveld, please behave Created 6 years, 8 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
OLDNEW
(Empty)
1 diff --git a/third_party/tlslite/tlslite/tlsrecordlayer.py b/third_party/tlslite /tlslite/tlsrecordlayer.py
2 index ff08cbf..fb85224 100755
3 --- a/third_party/tlslite/tlslite/tlsrecordlayer.py
4 +++ b/third_party/tlslite/tlslite/tlsrecordlayer.py
5 @@ -590,6 +590,9 @@ class TLSRecordLayer(object):
6 currentLength = len(b) + len(macBytes) + 1
7 blockLength = self._writeState.encContext.block_size
8 paddingLength = blockLength-(currentLength % blockLength)
9 + #SSL3 requires minimal padding. (TLS doesn't care.)
10 + if paddingLength == blockLength:
11 + paddingLength = 0
wtc 2014/04/08 22:29:09 This is how NSS does it: currentLength = len(
davidben 2014/04/08 23:30:36 Oh, that's much tidier. Done.
12
13 paddingBytes = bytearray([paddingLength] * (paddingLength+1))
14 if self.fault == Fault.badPadding:
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698