Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 136 by
achin...@gmail.com: Record Fragmentation not handled in
TLSMultiFactory(buf)
https://code.google.com/p/dpkt/issues/detail?id=136
What steps will reproduce the problem?
1. Send data more than 17000 Bytes.
2. The TLSMultiFactory will throw an error in finding the TLs version
3. The number of records returned is 0
What is the expected output? What do you see instead?
We should see two records, one with length 16383 and another record with
length 17000-16383
What version of the product are you using? On what operating system?
Dpkt 1.8 and Windows Platform, Win 8.1 64 Bit
Please provide any additional information below.
def TLSMultiFactory(buf):
'''
Attempt to parse one or more TLSRecord's out of buf
Args:
buf: string containing SSL/TLS messages. May have an incomplete record
on the end
Returns:
[TLSRecord]
int, total bytes consumed, != len(buf) if an incomplete record was
left at
the end.
Raises SSL3Exception.
'''
i, n = 0, len(buf)
msgs = []
while i < n:
v = buf[i+1:i+3]
if v in SSL3_VERSION_BYTES:
try:
msg = TLSRecord(buf[i:])
msgs.append(msg)
except dpkt.NeedData:
break
else:
raise SSL3Exception('Bad TLS version in buf: %r' % buf[i:i+5])
i += len(msg)
return msgs, i
I couldn't find the code that handles fragmentation in the Record layer.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings