Skip to content

Commit

Permalink
fix SSL2 decoding under python3
Browse files Browse the repository at this point in the history
  • Loading branch information
obormot committed Jul 16, 2020
1 parent 256ea49 commit 0567f1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dpkt/ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from . import dpkt
from . import ssl_ciphersuites
from .compat import compat_ord

#
# Note from April 2011: cde...@gmail.com added code that parses SSL3/TLS messages more in depth.
Expand All @@ -31,7 +32,7 @@ def unpack(self, buf):
self.msg, self.data = self.data[:n], self.data[n:]
else:
n = self.len = self.len & 0x3FFF
padlen = ord(self.data[0])
padlen = compat_ord(self.data[0])
self.msg = self.data[1:1 + n]
self.pad = self.data[1 + n:1 + n + padlen]
self.data = self.data[1 + n + padlen:]
Expand Down

0 comments on commit 0567f1a

Please sign in to comment.