mirror of
https://github.com/python-kasa/python-kasa.git
synced 2026-09-19 20:43:52 +00:00
Add ECDHE-RSA-AES256 cipher for newer Tapo firmware (#1755)
Add ECDHE-RSA-AES256-GCM-SHA384 alongside the existing ECDHE-RSA-AES128-GCM-SHA256 suite for newer Tapo firmware, while keeping all legacy suites for backward compatibility. Tested with Tapo TC70, C530WS, and C210 cameras after firmware updates produced TLS handshake failures.
This commit is contained in:
@@ -74,6 +74,7 @@ class SslAesTransport(BaseTransport):
|
|||||||
CIPHERS = ":".join(
|
CIPHERS = ":".join(
|
||||||
[
|
[
|
||||||
"ECDHE-RSA-AES128-GCM-SHA256",
|
"ECDHE-RSA-AES128-GCM-SHA256",
|
||||||
|
"ECDHE-RSA-AES256-GCM-SHA384",
|
||||||
"AES256-GCM-SHA384",
|
"AES256-GCM-SHA384",
|
||||||
"AES256-SHA256",
|
"AES256-SHA256",
|
||||||
"AES128-GCM-SHA256",
|
"AES128-GCM-SHA256",
|
||||||
|
|||||||
@@ -48,6 +48,12 @@ MOCK_STOCK = "abcdefghijklmnopqrstuvwxyz1234)("
|
|||||||
MOCK_UNENCRYPTED_PASSTHROUGH_STOK = "32charLowerCaseHexStok"
|
MOCK_UNENCRYPTED_PASSTHROUGH_STOK = "32charLowerCaseHexStok"
|
||||||
|
|
||||||
|
|
||||||
|
def test_ssl_ciphers_include_modern_tapo_suites() -> None:
|
||||||
|
"""Keep compatibility with cameras that dropped legacy RSA ciphers."""
|
||||||
|
assert "ECDHE-RSA-AES128-GCM-SHA256" in SslAesTransport.CIPHERS
|
||||||
|
assert "ECDHE-RSA-AES256-GCM-SHA384" in SslAesTransport.CIPHERS
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
(
|
(
|
||||||
"status_code",
|
"status_code",
|
||||||
|
|||||||
Reference in New Issue
Block a user