Skip to content

assert verify_store_signature does not raise exception in case of internal crypto error #288

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

Closed
bvavala opened this issue Jul 17, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@bvavala
Copy link
Member

bvavala commented Jul 17, 2020

The assert command here checks the verify_store_signature return value as a boolean value.
However, such return value originates from the signature verification API in the crypto lib, and it is a int -- the SWIG conversion should maintain the type. Most importantly, this value is -1 when there is an internal error in the crypto lib. In this case, the assert above does not raise any exception.
Also, this happens in other places.

Proposed solution: change the assert argument to (result > 0).

@bvavala bvavala added the bug Something isn't working label Jul 17, 2020
@cmickeyb
Copy link
Contributor

result >= 0?

@bvavala
Copy link
Member Author

bvavala commented Mar 30, 2023

No, I think it should be result > 0, because 0 means invalid and -1 means error

@bvavala
Copy link
Member Author

bvavala commented Apr 24, 2024

Addressed in #486

@bvavala bvavala closed this as completed Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants