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

check if client doesn't advertise in TLS 1.3 groups forbidden in TLS 1.3 #390

Merged
merged 1 commit into from
Jan 16, 2020

Conversation

tomato42
Copy link
Member

@tomato42 tomato42 commented Jan 15, 2020

fixes #389
tested by tlsfuzzer/tlsfuzzer#540


This change is Reviewable

@tomato42 tomato42 added the bug unintented behaviour in tlslite-ng code label Jan 15, 2020
@tomato42 tomato42 added this to the v0.8.0 milestone Jan 15, 2020
@tomato42 tomato42 self-assigned this Jan 15, 2020
@tomato42 tomato42 requested a review from t184256 January 16, 2020 13:53
Copy link
Collaborator

@t184256 t184256 left a comment

Choose a reason for hiding this comment

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

Unless you also intend to error out on other reserved values, I'd prefer 'obsolete' or 'obsoleted' over 'forbidden', to match the terminology more closely.

Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @t184256 and @tomato42)


tlslite/constants.py, line 360 at r1 (raw file):

# groups forbidden by RFC 8443 section B.3.1.5

RFC 8446 section B.3.1.4 ?


tlslite/constants.py, line 364 at r1 (raw file):

TLS_1_3_FORBIDDEN_GROUPS.update(range(0x1A, 0x1D))
TLS_1_3_FORBIDDEN_GROUPS.update([0xff01, 0xff02])
TLS_1_3_FORBIDDEN_GROUPS = frozenset(TLS_1_3_FORBIDDEN_GROUPS)

I think both frozenset().union(*iterables) and frozenset(itertools.chain(*iterables)) are more readable than a chain of .update()s and a cast.
Also, one more range > tuple > list.

Copy link
Member Author

@tomato42 tomato42 left a comment

Choose a reason for hiding this comment

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

Unless you also intend to error out on other reserved values

yes, we should error out on other values like that; while it departs from the terminology used in TLS 1.3 RFC it makes it much clearer what is the expected behaviour

Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @t184256 and @tomato42)


tlslite/constants.py, line 360 at r1 (raw file):

Previously, t184256 (Alexander Sosedkin) wrote…

RFC 8446 section B.3.1.4 ?

Done.


tlslite/constants.py, line 364 at r1 (raw file):

Previously, t184256 (Alexander Sosedkin) wrote…

I think both frozenset().union(*iterables) and frozenset(itertools.chain(*iterables)) are more readable than a chain of .update()s and a cast.
Also, one more range > tuple > list.

true, didn't think of update() accepting multiple iterables

Copy link
Collaborator

@t184256 t184256 left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 2 files at r1, 1 of 1 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@tomato42 tomato42 merged commit 5a25a97 into master Jan 16, 2020
@tomato42 tomato42 deleted the obsolete-curves branch January 16, 2020 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unintented behaviour in tlslite-ng code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Forbidden curves are tolerated in TLS 1.3 ClientHello's
2 participants