Fix TLS bug

This commit is contained in:
Sam Sneed 2024-07-24 18:29:31 -05:00
parent 5b380ca94d
commit 45dcc78fe2

11
main.py
View file

@ -238,12 +238,11 @@ def monitor_registry_changes():
# Verify TLS Certificates
def verify_tls_cert(url):
while True:
try:
response = requests.get(url, verify=certifi.where())
print(f"TLS certificate valid for {url}")
except requests.exceptions.SSLError as e:
print(f"TLS certificate error for {url}: {e}")
try:
response = requests.get(url, verify=certifi.where())
print(f"TLS certificate valid for {url}")
except requests.exceptions.SSLError as e:
print(f"TLS certificate error for {url}: {e}")
def monitor_tls_certificates():
urls = monitored_urls