Skip to content

bpo-37120: Add SSLContext.num_tickets (GH-13719) #13719

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

Merged
merged 1 commit into from
Jun 3, 2019

Conversation

tiran
Copy link
Member

@tiran tiran commented Jun 1, 2019

Signed-off-by: Christian Heimes [email protected]

https://bugs.python.org/issue37120

Copy link
Contributor

@njsmith njsmith left a comment

Choose a reason for hiding this comment

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

Two small comments.

This attribute is not available unless the ssl module is compiled
with OpenSSL 1.1.1 or newer.

.. versionadded:: 3.8
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably worth noting explicitly that it only affects TLS 1.3 connections, and possibly that it doesn't affect connections that are resumed using a ticket.

Copy link
Member Author

Choose a reason for hiding this comment

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

SGTM, the first sentence mentions that it's about TLS 1.3. I added another sentence to explicitly state that the setting does not affect TLS 1.0 to 1.2.

ctx.num_tickets = None

ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
self.assertEqual(ctx.num_tickets, 2)
Copy link
Contributor

Choose a reason for hiding this comment

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

It's maybe slightly nicer to make this error out too, I guess?

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean getattr access? I'm not sure how much trouble it's going to create.

@tiran tiran force-pushed the bpo-37120-session-ticket branch from 57ba3de to 0d12770 Compare June 3, 2019 18:09
@tiran tiran changed the title bpo-37120: Add SSLContext.num_tickets bpo-37120: Add SSLContext.num_tickets (GH-13719) Jun 3, 2019
@tiran tiran merged commit 78c7d52 into python:master Jun 3, 2019
@tiran tiran deleted the bpo-37120-session-ticket branch June 3, 2019 19:07
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants