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