fix ssl check

This commit is contained in:
Capybara-z
2025-08-13 20:43:29 +03:00
parent d7edddcaf4
commit 027d5cc0cf
+4 -2
View File
@@ -44,8 +44,10 @@ async def check_tcp_connection(host: str, port: int) -> bool:
return True
except ssl.SSLError as e:
err_text = str(e)
if "hostname mismatch" in err_text or "certificate is not valid for" in err_text:
return False
if ("hostname mismatch" in err_text or
"certificate is not valid for" in err_text or
"sslv3 alert handshake failure" in err_text):
return True
logger.warning(f"[SSL Error] Сертификат сервера {host} вызвал ошибку: {e}")
await notify_ssl_error(host, err_text)
return False