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

Documents how to use private keys with passphrases #525

Merged
merged 1 commit into from
Oct 29, 2020

Conversation

rayluo
Copy link
Contributor

@rayluo rayluo commented Oct 20, 2020

This can address #286

from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.backends import default_backend

pem_bytes = b'-----BEGIN PRIVATE KEY-----\nMIGEAgEAMBAGByqGSM49AgEGBS...'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is b'' needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That line was copied from an already-existing line here. :-)

Copy link
Contributor Author

@rayluo rayluo Oct 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I even dig into cryptography's official doc. They requires a bytes-like pem data. So, there is no problem of this line.

Can someone provide more reviews if any, or simply merge this in?

CC: @mark-adams @jpadilla

@jpadilla jpadilla merged commit f0a4c32 into jpadilla:master Oct 29, 2020
@jpadilla
Copy link
Owner

@rayluo thanks

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.

None yet

3 participants