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

Better method to raise and catch specific OpenSSL errors #197

Open
cygnusv opened this issue Jul 16, 2018 · 0 comments
Open

Better method to raise and catch specific OpenSSL errors #197

cygnusv opened this issue Jul 16, 2018 · 0 comments

Comments

@cygnusv
Copy link
Member

cygnusv commented Jul 16, 2018

In several places we catch specific OpenSSL errors, all of them instantiated as cryptography.exceptions.InternalError. However, we are only interested in particular cases, which can be filtered by the reason attribute:

  • Point at infinity (code 106)
  • Point not in the curve (code 107)
  • Invalid compressed point (code 110)

It would be good to create a custom error-handling mechanism to manage this better.

@cygnusv cygnusv changed the title Better method to raise specific OpenSSL errors Better method to raise and catch specific OpenSSL errors Jul 16, 2018
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

1 participant