diff --git a/README.md b/README.md index 4db7902..75ad55d 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ The Sagemcom F@st series is used by multiple cable companies, where some cable c | Sagemcom F@st 3865b | Proximus (b-box3) | md5 | | | Sagemcom F@st 3890V3 | Delta / Zeelandnet | sha512 | | | Sagemcom F@st 3890V3 | DNA (DNA Mesh Wifi F-3890) | sha512 | username: admin | -| Sagemcom F@st 3896 | Ziggo* | sha512 | username: admin | +| Sagemcom F@st 3896 | Ziggo1 | sha512 | username: admin | | Sagemcom F@st 4360Air | KPN | md5 | | | Sagemcom F@st 4353 | Belong Gateway | md5 | username: admin, password: "" | | Sagemcom F@st 5250 | Bell (Home Hub 2000) | md5 | username: guest, password: "" | @@ -39,9 +39,12 @@ The Sagemcom F@st series is used by multiple cable companies, where some cable c | Sagemcom F@st 5690 | Bell (Giga Hub) | sha512 | username: admin, password: "" | | Sagemcom F@st 5655V2 | MásMóvil | md5 | | | Sagemcom F@st 5657IL | | md5 | | +| Sagemcom F@st 5360 | Sunrise Internet Box2 | md5 | username: admin | | Speedport Pro | Telekom | md5 | username: admin | -* The firmware provided on the Sagemcom F@st 3896 router from Ziggo does not support the endpoint used in this library. [sagemcom-f3896lg-zg-api](https://github.com/mgyucht/sagemcom-f3896lg-zg-api) provides an API client suitable for Ziggo's firmware. +1 The firmware provided on the Sagemcom F@st 3896 router from Ziggo does not support the endpoint used in this library. [sagemcom-f3896lg-zg-api](https://github.com/mgyucht/sagemcom-f3896lg-zg-api) provides an API client suitable for Ziggo's firmware. + +2 If you run into `SSLV3_ALERT_HANDSHAKE_FAILURE` errors, see [here](docs/ssl-error.md) for a workaround. > Contributions welcome. If you router model is supported by this package, but not in the list above, please create [an issue](https://github.com/iMicknl/python-sagemcom-api/issues/new) or pull request. diff --git a/docs/ssl-error.md b/docs/ssl-error.md new file mode 100644 index 0000000..d11db12 --- /dev/null +++ b/docs/ssl-error.md @@ -0,0 +1,22 @@ +## Troubleshooting `SSLV3_ALERT_HANDSHAKE_FAILURE` + +A `SSLV3_ALERT_HANDSHAKE_FAILURE` error when connecting to the router indicates that there is a mismatch with the cipher being used in the SSL connection (see [here](https://stackoverflow.com/a/73254780/487356)). + +Running `openssl s_client -connect :` on the router shows what cipher can be used. In the case of a "Sunrise Internet Box" it was `AES256-GCM-SHA384`. + +The following code snippet shows how to set up a `SagemcomClient` configured to use that specific cipher (and not validating the router's certificate): + +``` +async def main() -> None: + sslcontext = ssl._create_unverified_context() + sslcontext.set_ciphers("AES256-GCM-SHA384") + + session = ClientSession( + headers={"User-Agent": f"{DEFAULT_USER_AGENT}"}, + timeout=ClientTimeout(DEFAULT_TIMEOUT), + connector=TCPConnector( + ssl_context=sslcontext + ) + ) + async with SagemcomClient(HOST, USERNAME, PASSWORD, ENCRYPTION_METHOD, session=session) as client: +```