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

tls_expiry deprecated protocol warning #1623

Open
cpina opened this issue Feb 26, 2025 · 0 comments
Open

tls_expiry deprecated protocol warning #1623

cpina opened this issue Feb 26, 2025 · 0 comments

Comments

@cpina
Copy link
Contributor

cpina commented Feb 26, 2025

In simplemonitor/Monitors/network.py there is:

        # Note: at time of writing, ssl does not support TLS1.3
        ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)

This is giving a warning:

/usr/bin/python3.11 /home/carles/git/simplemonitor-tls-expiry/tls_test.py 
/home/carles/git/simplemonitor-tls-expiry/tls_test.py:6: DeprecationWarning: ssl.PROTOCOL_TLSv1_2 is deprecated
  ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)

Process finished with exit code 0

It seems that the recommended way would be using ssl.PROTOCOL_TLS_CLIENT instead of ssl.PROTOCOL_TLSv1_2 (https://docs.python.org/3/library/ssl.html#ssl.PROTOCOL_TLS_CLIENT) which also enables CERT_REQUIRED and check_hostname by default (related to #1622 )

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