OLD | NEW |
1 diff --git a/third_party/tlslite/tlslite/tlsrecordlayer.py b/third_party/tlslite
/tlslite/tlsrecordlayer.py | 1 diff --git a/third_party/tlslite/tlslite/tlsrecordlayer.py b/third_party/tlslite
/tlslite/tlsrecordlayer.py |
2 index ff08cbf..8b92221 100644 | 2 index f18fcf5..01ff3e9 100644 |
3 --- a/third_party/tlslite/tlslite/tlsrecordlayer.py | 3 --- a/third_party/tlslite/tlslite/tlsrecordlayer.py |
4 +++ b/third_party/tlslite/tlslite/tlsrecordlayer.py | 4 +++ b/third_party/tlslite/tlslite/tlsrecordlayer.py |
5 @@ -586,10 +586,10 @@ class TLSRecordLayer(object): | 5 @@ -592,9 +592,9 @@ class TLSRecordLayer(object): |
6 if self.version == (3,2): | |
7 b = self.fixedIVBlock + b | 6 b = self.fixedIVBlock + b |
8 | 7 |
9 - #Add padding: b = b+ (macBytes + paddingBytes) | 8 #Add padding: b = b+ (macBytes + paddingBytes) |
10 - currentLength = len(b) + len(macBytes) + 1 | 9 - currentLength = len(b) + len(macBytes) + 1 |
11 + #Add padding: b = b + (macBytes + paddingBytes) | |
12 + currentLength = len(b) + len(macBytes) | 10 + currentLength = len(b) + len(macBytes) |
13 blockLength = self._writeState.encContext.block_size | 11 blockLength = self._writeState.encContext.block_size |
14 - paddingLength = blockLength-(currentLength % blockLength) | 12 - paddingLength = blockLength-(currentLength % blockLength) |
15 + paddingLength = blockLength - 1 - (currentLength % blockLength) | 13 + paddingLength = blockLength - 1 - (currentLength % blockLength) |
16 | 14 |
17 paddingBytes = bytearray([paddingLength] * (paddingLength+1)) | 15 paddingBytes = bytearray([paddingLength] * (paddingLength+1)) |
18 if self.fault == Fault.badPadding: | 16 if self.fault == Fault.badPadding: |
OLD | NEW |