bpo-31399: Let OpenSSL verify hostname and IP address#3462
Conversation
a3fa2cf to
75d33a3
Compare
January 11, 2018 20:51
75d33a3 to
35176ba
Compare
January 11, 2018 21:14
35176ba to
65faab4
Compare
January 11, 2018 21:18
alex
left a comment
There was a problem hiding this comment.
Mostly looks good, from a first skim
Sorry, something went wrong.
65faab4 to
c9f4c6f
Compare
January 11, 2018 22:02
|
Thanks @alex I have updated the comment for |
Sorry, something went wrong.
e499eca to
89a28a5
Compare
January 12, 2018 14:54
Sorry, something went wrong.
asvetlov
left a comment
There was a problem hiding this comment.
asyncio test change is correct (but please update assertion as suggested)
Sorry, something went wrong.
c400837 to
d1dd4f3
Compare
January 16, 2018 21:09
|
@asvetlov Thanks, I changed the assert as requested I also forgot to remove the call to match_hostname. How should I handle the call in asyncio? If I remove it, the code will no worker be secure on 3.6. |
Sorry, something went wrong.
This change is for 3.7 only, right? If so just remove the call in the |
Sorry, something went wrong.
d1dd4f3 to
d07134d
Compare
January 17, 2018 10:20
|
Yes, it's 3.7 only. |
Sorry, something went wrong.
d07134d to
7b5edd5
Compare
January 20, 2018 09:43
|
This branch is now based on PR #5242. Please review and ACK the other PR first. |
Sorry, something went wrong.
7c4fc70 to
197d51f
Compare
January 20, 2018 12:25
|
Are there stoppers for the issue left? |
Sorry, something went wrong.
|
Good to know. |
Sorry, something went wrong.
alex
left a comment
There was a problem hiding this comment.
Code looks fine, I have some API design concerns though.
Sorry, something went wrong.
2199b99 to
e819fbd
Compare
January 23, 2018 11:17
The ssl module now uses OpenSSL's X509_VERIFY_PARAM_set1_host() and X509_VERIFY_PARAM_set1_ip() API to verify hostname and IP addresses. Signed-off-by: Christian Heimes <christian@python.org>
Signed-off-by: Christian Heimes <christian@python.org>
Signed-off-by: Christian Heimes <christian@python.org>
libssl must provide X509_VERIFY_PARAM_set1_host() Signed-off-by: Christian Heimes <christian@python.org>
Signed-off-by: Christian Heimes <christian@python.org>
Remove all hostflags except for NO_PARTIAL_WILDCARDS and NEVER_CHECK_SUBJECT. The other flags aren't that useful at the moment. Don't support OpenSSL special mode with a leading dot, e.g. ".example.org" matches "www.example.org". It's not standard conform. Signed-off-by: Christian Heimes <christian@python.org>
Host flags are now in internal API. Public API is a new attribute hostname_checks_common_name. Signed-off-by: Christian Heimes <christian@python.org>
e819fbd to
845c149
Compare
January 26, 2018 15:35
|
@tiran: Please replace |
Sorry, something went wrong.
|
Running into this patch on travis-ci as ubuntu trusty ships with openssl 1.0.1 -- this patch causes python3.7 to build without
I agree that the patch is the right move going forward 👍, figured I'd post this here for visibility though. |
Sorry, something went wrong.
Replace Python's custom ssl.match_hostname() with OpenSSL 1.0.2 APIs. The hostname or IP address are now verified by OpenSSL during the TLS handshake. A failure to verify the name results in a proper handshake abort with TLS Alert
bad cert.Signed-off-by: Christian Heimes christian@python.org
https://bugs.python.org/issue31399