-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
SSL improvements #5716
SSL improvements #5716
Conversation
thanks! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, adding in the SSL Context functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor suggestions. Thanks for following the CPython API!
The base branch was changed.
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Documentation fixed for wrap_socket (indentation to place it under the correct class, and added the self argument).
SSLContext.wrap_socket now accepts server_hostname=None (the default value). This previously returned an error (TypeError: Can't convert 'NoneType' object to str implicitly).
Implemented the server_hostname argument which was previously ignored. This is done by giving the SSLSocket it's own copy of the ESP-TLS config structure so that we can set the common_name value within it.
Implemented the check_hostname property, load_verify_locations() and set_default_verify_paths() methods on SSLContext. These are based on the documented CPython interfaces.