Skip to content
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

ldap3/core/tls.py:317: DeprecationWarning: ssl.match_hostname() is deprecated #1100

Open
ScottABrown opened this issue Sep 29, 2023 · 0 comments

Comments

@ScottABrown
Copy link

ScottABrown commented Sep 29, 2023

Per the title: with Python 3.11.4 (and presumably anything 3.7 or later) tls.py generates the warning

ldap3/core/tls.py:317: DeprecationWarning: ssl.match_hostname() is deprecated

Per https://docs.python.org/3/library/ssl.html?highlight=match_hostname#ssl.match_hostname, it seems the functionality is now provided by the underlying OpenSSL libraries, and so the method is deprecated as superfluous? Hence just suppressing the warning should be safe.

Changed in version 3.7: The function is no longer used to TLS connections. Hostname matching is now performed by OpenSSL.

Allow wildcard when it is the leftmost and the only character in that segment. Partial wildcards like www*.example.com are no longer supported.

Deprecated since version 3.7.

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

No branches or pull requests

1 participant