bpo-32819: Simplify and improve ssl.match_hostname by tiran · Pull Request #5620 · 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

Conversation7 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 }})

tiran

asvetlov

Choose a reason for hiding this comment

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

I like the change

pitrou

The function matches IP addresses rather than dNSNames if hostname is a
valid ipaddress string. IPv4 addresses are supported on all platforms.
IPv6 addresses are supported on platforms withs IPv6 support (AF_INET6

Choose a reason for hiding this comment

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

s/withs/with/

pitrou

Choose a reason for hiding this comment

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

LGTM except one minor nit.

@tiran

ssl.match_hostname() has been simplified and no longer depends on re and ipaddress module for wildcard and IP addresses. Error reporting for invalid wildcards has been improved.

Signed-off-by: Christian Heimes christian@python.org

@tiran

Thanks @pitrou !

I have fixed the typo and rebased the PR.

pitrou

@bedevere-bot

@tiran: Please replace # with GH- in the commit message next time. Thanks!

@miss-islington

Thanks @tiran for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@tiran tiran deleted the bpo-32819-match-hostname branch

February 24, 2018 13:36

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Feb 24, 2018

@tiran @miss-islington

ssl.match_hostname() has been simplified and no longer depends on re and ipaddress module for wildcard and IP addresses. Error reporting for invalid wildcards has been improved.

Signed-off-by: Christian Heimes christian@python.org (cherry picked from commit aef1283)

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

@bedevere-bot

tiran added a commit that referenced this pull request

Feb 24, 2018

@miss-islington @tiran

…5847)

ssl.match_hostname() has been simplified and no longer depends on re and ipaddress module for wildcard and IP addresses. Error reporting for invalid wildcards has been improved.

Signed-off-by: Christian Heimes christian@python.org (cherry picked from commit aef1283)

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