Index: third_party/tlslite/patches/ssl3_padding.patch |
diff --git a/third_party/tlslite/patches/ssl3_padding.patch b/third_party/tlslite/patches/ssl3_padding.patch |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2c6e28acc616ee5377b225a4021a045e8b01572e |
--- /dev/null |
+++ b/third_party/tlslite/patches/ssl3_padding.patch |
@@ -0,0 +1,18 @@ |
+diff --git a/third_party/tlslite/tlslite/tlsrecordlayer.py b/third_party/tlslite/tlslite/tlsrecordlayer.py |
+index ff08cbf..8b92221 100644 |
+--- a/third_party/tlslite/tlslite/tlsrecordlayer.py |
++++ b/third_party/tlslite/tlslite/tlsrecordlayer.py |
+@@ -586,10 +586,10 @@ class TLSRecordLayer(object): |
+ if self.version == (3,2): |
+ b = self.fixedIVBlock + b |
+ |
+- #Add padding: b = b+ (macBytes + paddingBytes) |
+- currentLength = len(b) + len(macBytes) + 1 |
++ #Add padding: b = b + (macBytes + paddingBytes) |
++ currentLength = len(b) + len(macBytes) |
+ blockLength = self._writeState.encContext.block_size |
+- paddingLength = blockLength-(currentLength % blockLength) |
++ paddingLength = blockLength - 1 - (currentLength % blockLength) |
+ |
+ paddingBytes = bytearray([paddingLength] * (paddingLength+1)) |
+ if self.fault == Fault.badPadding: |