Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions kasa/transports/klaptransport.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ async def perform_handshake1(self) -> tuple[bytes, bytes, bytes]:

if default_credentials_seed_auth_hash == server_hash:
_LOGGER.debug(
"Server response doesn't match our expected hash on ip %s, "
"but an authentication with %s default credentials matched",
"Device response did not match our expected hash on ip %s,"
"but an authentication with %s default credentials worked",
self._host,
key,
)
Expand All @@ -235,13 +235,16 @@ async def perform_handshake1(self) -> tuple[bytes, bytes, bytes]:

if blank_seed_auth_hash == server_hash:
_LOGGER.debug(
"Server response doesn't match our expected hash on ip %s, "
"but an authentication with blank credentials matched",
"Device response did not match our expected hash on ip %s, "
"but an authentication with blank credentials worked",
self._host,
)
return local_seed, remote_seed, self._blank_auth_hash # type: ignore

msg = f"Server response doesn't match our challenge on ip {self._host}"
msg = (
f"Device response did not match our challenge on ip {self._host}, "
f"check that your e-mail and password (both case-sensitive) are correct. "
)
_LOGGER.debug(msg)
raise AuthenticationError(msg)

Expand Down
5 changes: 4 additions & 1 deletion kasa/transports/sslaestransport.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,10 @@ async def perform_handshake1(self) -> tuple[str, str, str] | None:
_LOGGER.debug("Credentials match")
return local_nonce, server_nonce, pwd_hash

msg = f"Server response doesn't match our challenge on ip {self._host}"
msg = (
f"Device response did not match our challenge on ip {self._host}, "
f"check that your e-mail and password (both case-sensitive) are correct. "
)
_LOGGER.debug(msg)

raise AuthenticationError(msg)
Expand Down
Loading