jamesoff / simplemonitor

A Python-based network and host monitor
https://simplemonitor.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
404 stars 165 forks source link

update tls-expiry to support TLS 1.3 #1430

Closed stillbeben closed 1 month ago

stillbeben commented 1 month ago

PROTOCOL_TLSv1_2 is deprecated since Python 3.6. Instead we can switch to https://docs.python.org/3/library/ssl.html#ssl.PROTOCOL_TLS_CLIENT As simplemonitor already required Python 3.6, this one does not break compatibility.

Tested against an nginx 1.26.1 with OpenSSL 3.2.1 using Pyton 3.12.4. nginx was TLS 1.3 only.

Tested with various internet facing web servers that also support TLS 1.1 and 1.2.

jamesoff commented 1 month ago

Thanks!