-
Notifications
You must be signed in to change notification settings - Fork 721
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
DeprecationWarning: ssl.PROTOCOL_TLS is deprecated #653
Comments
I could open a PR if the proposed solution sounds like a good idea. |
@maranov sounds good to me. Would love to see this warning disappear. 👍 |
PROTOCOL_TLS_CLIENT/_SERVER are attempted to be selected before falling back to the legacy PROTOCOL_TLS setting. The side effects of using PROTOCOL_TLS_CLIENT is that CERT_REQUIRED and check_hostname are enabled by default, but these were explicitly used as a default already and remain to be the defaults even if PROTOCOL_TLS_CLIENT is unavailable. Bug: eclipse#653 Signed-off-by: Marek Novak <me@maranov.cz>
As PR #665 has now been merged I believe this issue can be closed. Note that there are a few other related issues that will remain open (the documentation does not really match the code). Note: This is part of an exercise to clean up old issues so that the project can move forwards. Due to the number of issues being worked through mistakes will be made; please feel free to reopen this issue (or comment) if you believe it's been closed in error. |
Per Python ssl docs, the
PROTOCOL_TLS
has been deprecated, replaced withPROTOCOL_TLS_CLIENT/SERVER
. This setting is used in the client at:paho.mqtt.python/src/paho/mqtt/client.py
Line 791 in 9782ab8
From what I understood, the
PROTOCOL_TLS_CLIENT
should be the correct replacement (for client connections), but it has some side effects:Looking at the client code, this seems to be the defaults for
tls_set
as well. Replacing thePROTOCOL_TLS
withPROTOCOL_TLS_CLIENT
, while usingPROTOCOL_TLS
as a fallback for Python 2.7 should remove the deprecation warning.The text was updated successfully, but these errors were encountered: