Skip to content

[3.7] [bpo-28414] Make all hostnames in SSL module IDN A-labels (GH-5128) #5843

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
Feb 24, 2018

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Feb 24, 2018

Previously, the ssl module stored international domain names (IDNs)
as U-labels. This is problematic for a number of reasons -- for
example, it made it impossible for users to use a different version
of IDNA than the one built into Python.

After this change, we always convert to A-labels as soon as possible,
and use them for all internal processing. In particular, server_hostname
attribute is now an A-label, and on the server side there's a new
sni_callback that receives the SNI servername as an A-label rather than
a U-label.
(cherry picked from commit 11a1493)

Co-authored-by: Christian Heimes christian@python.org

https://bugs.python.org/issue28414

)

Previously, the ssl module stored international domain names (IDNs)
as U-labels. This is problematic for a number of reasons -- for
example, it made it impossible for users to use a different version
of IDNA than the one built into Python.

After this change, we always convert to A-labels as soon as possible,
and use them for all internal processing. In particular, server_hostname
attribute is now an A-label, and on the server side there's a new
sni_callback that receives the SNI servername as an A-label rather than
a U-label.
(cherry picked from commit 11a1493)

Co-authored-by: Christian Heimes <christian@python.org>
@njsmith
Copy link
Contributor

njsmith commented Feb 24, 2018

@ned-deily Hi Ned, here's a PR for 3.7b2 (cf https://bugs.python.org/issue28414#msg310992).

@ned-deily
Copy link
Member

@njsmith Thanks! When it's ready, just merge it into the 3.7 branch and it will get picked up for 3.7.0b2.

@miss-islington
Copy link
Contributor Author

@tiran and @njsmith: Backport status check is done, and it's a success ✅ .

@njsmith njsmith merged commit 1c37e27 into python:3.7 Feb 24, 2018
@miss-islington
Copy link
Contributor Author

Thanks, @njsmith!

@miss-islington miss-islington deleted the backport-11a1493-3.7 branch February 24, 2018 03:18
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.

6 participants