-
Notifications
You must be signed in to change notification settings - Fork 473
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
SNOW-1820480 making OCSP validation code more resillient #2107
SNOW-1820480 making OCSP validation code more resillient #2107
Conversation
One user who was encountering this issue has tested this fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
additional_kwargs: dict[str, typing.Any] = dict() | ||
if isinstance(public_key, RSAPublicKey): | ||
additional_kwargs["padding"] = padding.PKCS1v15() | ||
additional_kwargs["algorithm"] = utils.Prehashed(chosen_hash) | ||
elif isinstance(public_key, DSAPublicKey): | ||
additional_kwargs["algorithm"] = utils.Prehashed(chosen_hash) | ||
elif isinstance(public_key, EllipticCurvePublicKey): | ||
additional_kwargs["signature_algorithm"] = ECDSA( | ||
utils.Prehashed(chosen_hash) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fix covers more than the issue reported by the user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, only the reported issue. TypeError
is raised in the case where we send in too many arguments to the verify()
call.
@@ -11,6 +11,7 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne | |||
- v3.12.4(TBD) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this still be TBD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless you can tell me when the next release is happening yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Please answer these questions before submitting your pull requests. Thanks!
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-1774037: OCSP check fails when execption is not of type RevocationCheckError #2094
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
I try to make the code that calls into cryptography more resilient against TypeErrors.
(Optional) PR for stored-proc connector: