Skip to content

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

Merged
njsmith merged 1 commit into
python:3.7from
miss-islington:backport-11a1493-3.7
Feb 24, 2018
Merged

[3.7] [bpo-28414] Make all hostnames in SSL module IDN A-labels (GH-5128)#5843
njsmith merged 1 commit into
python:3.7from
miss-islington:backport-11a1493-3.7

Conversation

@miss-islington

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

Copy link
Copy Markdown
Contributor

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

njsmith commented Feb 24, 2018

Copy link
Copy Markdown
Contributor

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

@ned-deily

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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