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 )
In
simplemonitor/Monitors/network.pythere is:This is giving a warning:
It seems that the recommended way would be using
ssl.PROTOCOL_TLS_CLIENTinstead ofssl.PROTOCOL_TLSv1_2(https://docs.python.org/3/library/ssl.html#ssl.PROTOCOL_TLS_CLIENT) which also enablesCERT_REQUIREDandcheck_hostnameby default (related to #1622 )