Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RecordLayer length doubt #45

Closed
luisespla opened this issue Jul 21, 2015 · 3 comments
Closed

RecordLayer length doubt #45

luisespla opened this issue Jul 21, 2015 · 3 comments
Labels

Comments

@luisespla
Copy link

Hello,
When I add a SNI with length of 65000 bytes, I only see a RecordLayer but I read TLS RFC(5246), I think that they say that the maximum size of RecordLayer is 2 ^14 (16384 bytes).
Is it a bug or is it available to use bigger size than 16384?
BR

@tintinweb
Copy link
Owner

It is not a bug.
RFC-5246 (TLS1.2) restricts the maximum fragment size to 2^14 bytes. scapy-ssl_tls layers have no intention to artificially limit you to this length even-though it is not RFC compliant. We allow you to create records up to the maximum possible size (USHRT_MAX=2^16-1). if you want to transport SNI entries larger than 2^14 bytes (record length) you'll have to fragment the resulting layer into multiple <= 2^14 bytes records. see #43

@alexmgr
Copy link
Collaborator

alexmgr commented Jul 23, 2015

As Tin mentioned, this is not a bug. I added fragmentation support in PR #46. It's still up to you to fragment on the 2^14 boundary though (using tls_fragment_payload() or fragment()).
This is because it allows one to create fragments larger then the allowed limit.

@alexmgr
Copy link
Collaborator

alexmgr commented Jul 27, 2015

Merged #46. We know raise exceptions when fragmentation is needed. Closing.

@alexmgr alexmgr closed this as completed Jul 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants