Skip to content
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

Exception handling on Key.verify for incompatible type of signature #8

Closed
PradyumnaKrishna opened this issue Aug 2, 2022 · 2 comments

Comments

@PradyumnaKrishna
Copy link

Description of issue or feature request:
Key.verify method can produce unknown error's during verification of signatures. Example: If a GPGKey is used to verify a signature of type Signature, will cause a FormatError. With FormatError determining the cause of error is not easy.
Key.verify method should handle these exceptions and raise exceptions for different causes.

Current behavior:
No error handling in Key.verify.

Expected behavior:
Error handling should be added to Key.verify.

Ref: #2 (comment)

@lukpueh
Copy link
Member

lukpueh commented Aug 2, 2022

TLDR #2 (comment): Change Key.verify to return None on success and raise error otherwise.

@lukpueh
Copy link
Member

lukpueh commented Jan 10, 2023

Fixed upstream in secure-systems-lab#456, see signer.Key.verify_signature.

@lukpueh lukpueh closed this as completed Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants