bpo-28414: ssl module idna test by tiran · Pull Request #5395 · python/cpython (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation5 Commits1 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except for one minor comment.
I'm kind of confused about what your overall plan for this is right now – are you still planning to make sslsock.server_hostname
be an A-label? Are you still planning to fix the SNI callback as discussed previously?
Should there also be tests for SSLObject
's handling of server_hostname
?
with context.wrap_socket(socket.socket(), |
---|
server_hostname=server_hostname) as s: |
# Always IDN A-label as ASCII str |
self.assertEqual(s.server_hostname, expected_hostname) |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment does not appear to match what this is testing right now.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, thanks. I fixed the comment
I clarified the commit message. I'll address IDNA 2008 after beta 1. Ned granted an exception. This PR just proofs that most IDNA cases are working. Only IDNA 2008 deviations like German' ß are still not working yet.
I'll also add SSLObject tests when I fix IDNA 2008. Right now SSLObject behaves slightly differently (of course) and I'm having a hard time to write a test for it.
Add test cases for IDNA 2003 and 2008 host names. IDNA 2003 internationalized host names are working since bpo-31399 has landed. IDNA 2008 deviations are still broken and will be fixed in another patch.
Signed-off-by: Christian Heimes christian@python.org
@tiran: Please replace #
with GH-
in the commit message next time. Thanks!
tiran deleted the ssl_idna_test branch