Skip to content
Permalink
Browse files

Fix IndexError on junk message.

  • Loading branch information...
Trevor Perrin
Trevor Perrin committed Aug 5, 2015
1 parent 496980f commit aca8d4f898b436ff6754e1a9ab96cae976c8a853
Showing with 6 additions and 0 deletions.
  1. +6 −0 tlslite/tlsrecordlayer.py
@@ -970,6 +970,12 @@ def _decryptRecord(self, recordType, b):
if self.version >= (3,2): #For TLS 1.1, remove explicit IV
b = b[self._readState.encContext.block_size : ]

if len(b) == 0:
for result in self._sendError(\
AlertDescription.decryption_failed,
"No data left after decryption and IV removal"):
yield result

#Check padding
paddingGood = True
paddingLength = b[-1]

0 comments on commit aca8d4f

Please sign in to comment.
You can’t perform that action at this time.