Skip to content

Conversation

@DmitriyMusatkin
Copy link
Contributor

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.

awscrt/crypto.py Outdated
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':
Copy link
Contributor

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?

DmitriyMusatkin and others added 7 commits November 19, 2024 10:24
Co-authored-by: Michael Graeb <graebm@amazon.com>
Co-authored-by: Michael Graeb <graebm@amazon.com>
Co-authored-by: Michael Graeb <graebm@amazon.com>
Co-authored-by: Michael Graeb <graebm@amazon.com>
Co-authored-by: Michael Graeb <graebm@amazon.com>
Co-authored-by: Michael Graeb <graebm@amazon.com>
@DmitriyMusatkin DmitriyMusatkin merged commit e856566 into main Nov 19, 2024
64 checks passed
@DmitriyMusatkin DmitriyMusatkin deleted the pems branch November 19, 2024 19:22
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

Successfully merging this pull request may close these issues.

2 participants