-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decryption failure not mapped to an appropriate error? #89
Comments
Looking at the code I can't really see how this could happen:
decrypt_block would have to be returning True o_O?? |
Ok this sounds interesting... The Can any of the HA users perhaps add some print/logging to get the values that are actually there? I guess we must be missing some cast/auto conversion issues. Does this happen with Bluetooth or IP accessories? |
decrypted = self.decrypt_block(length, block, tag)
# TODO how to react to False?
if tmp is not False:
response.parse(decrypted) Should that be |
Oh my word, how did my eyes misparse that bit of code. I had totally read it as But I think we need to do more than that as the proper fix. Whenever we have seen this error in HA it has been "part 2" of the problem after the connection has already timed out or reset and is already non-functional. And the spec says:
I think if decryption fails we need to raise an exception, and like with |
So we should basically raise a new exception and close the socket? |
Yep I think so 👍🏻 |
I think this can be closed |
Sometimes decryption fails for HA users and homekit tries to append a bool to a bytearray:
The text was updated successfully, but these errors were encountered: