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

TLS 1.3 padding support #217

Merged
merged 1 commit into from
Feb 23, 2018
Merged

TLS 1.3 padding support #217

merged 1 commit into from
Feb 23, 2018

Conversation

ep69
Copy link
Collaborator

@ep69 ep69 commented Feb 22, 2018

fixes #189


This change is Reviewable

@@ -185,6 +189,7 @@ def __init__(self):
self.dhParams = None
self.dhGroups = list(ALL_DH_GROUP_NAMES)
self.defaultCurve = "secp256r1"
self.padding_cb = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be copied in validate()

data += bytearray([contentType])
if self.padding_cb:
# add number of zero bytes specified by padding_cb()
data += bytearray(self.padding_cb(len(data), contentType))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

callback should get the maximum size of padding it can add as one of the parameters

@tomato42
Copy link
Member

so the max size should be the 2**14 - len(data) - 1 (because that 2**14 will be negotiable later)

@tomato42 tomato42 merged commit 3e0b221 into tlsfuzzer:master Feb 23, 2018
@tomato42
Copy link
Member

looks good, thanks!

@tomato42 tomato42 added the enhancement new feature to be implemented label Feb 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new feature to be implemented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add support for creating records with padding in TLS 1.3
2 participants