diff --git a/src/freebox_api/aiofreepybox.py b/src/freebox_api/aiofreepybox.py index c2275683..cfdedd76 100644 --- a/src/freebox_api/aiofreepybox.py +++ b/src/freebox_api/aiofreepybox.py @@ -118,6 +118,10 @@ async def open(self, host: str, port: str) -> None: cert_path = os.path.join(os.path.dirname(__file__), "freebox_certificates.pem") ssl_ctx = ssl.create_default_context() ssl_ctx.load_verify_locations(cafile=cert_path) + if ".fbxos.fr" in host or "mafreebox.freebox.fr" in host: + # Disable strict validating introduced in Python 3.13, which doesn't + # work with default Freebox certificates + ssl_ctx.verify_flags &= ~ssl.VERIFY_X509_STRICT conn = TCPConnector(ssl_context=ssl_ctx) self._session = ClientSession(connector=conn)