Skip to content

Commit b8dd930

Browse files
committed
Disable ssl VERIFY_X509_STRICT
The new flag enforced in Python 3.13 with python/cpython#107361 doesn't work with the semi broken Freebox self signed certificates. It should fix home-assistant/core#132333 Fixes hacf-fr#734
1 parent b39c682 commit b8dd930

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/freebox_api/aiofreepybox.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ async def open(self, host: str, port: str) -> None:
118118
cert_path = os.path.join(os.path.dirname(__file__), "freebox_certificates.pem")
119119
ssl_ctx = ssl.create_default_context()
120120
ssl_ctx.load_verify_locations(cafile=cert_path)
121+
# Disable strict validating introduced in Python 3.13, which doesn't work with default Freebox certificates
122+
ssl_ctx.verify_flags &= ~ssl.VERIFY_X509_STRICT
121123

122124
conn = TCPConnector(ssl_context=ssl_ctx)
123125
self._session = ClientSession(connector=conn)

0 commit comments

Comments
 (0)