-
Notifications
You must be signed in to change notification settings - Fork 42
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
RSA PKCS 1.5 SHA1 signing support and der helper functions #609
Conversation
awscrt/crypto.py
Outdated
@@ -118,6 +123,24 @@ def new_public_key_from_pem_data(pem_data: Union[str, bytes, bytearray, memoryvi | |||
""" | |||
return RSA(binding=_awscrt.rsa_public_key_from_pem_data(pem_data)) | |||
|
|||
@staticmethod | |||
def new_private_key_from_der_data(der_data: Union[str, bytes, bytearray, memoryview]) -> 'RSA': |
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.
I'm confused whether der_data is supposed to be binary or text? I thought DER was binary, but in your tests it looks like BASE64 or something
If it's really only supposed to be binary, then don't take str.
If it is supposed to accept... str
, Py_ArgParseTuple("s*") is ALWAYS going to transform it into UTF-8. Is that OK?
Co-authored-by: Michael Graeb <[email protected]>
Co-authored-by: Michael Graeb <[email protected]>
Co-authored-by: Michael Graeb <[email protected]>
Co-authored-by: Michael Graeb <[email protected]>
Co-authored-by: Michael Graeb <[email protected]>
Co-authored-by: Michael Graeb <[email protected]>
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.