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

Clarifying behavior for Crypto.PublicKey.RSA.export_key in docs #798

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Prateek2000
Copy link

The format='OpenSSH' parameter in Crypto.PublicKey.RSA.export_key when used with a private key exports the public key instead. The code extracts only the public key parameters and writes them to bytes from what I understand.

The current doc says "Only suitable for public keys", which I think does not convey what could happen if someone were to use a private key anyhow. It does not throw an error either. So I believe it would make sense to document this behavior.

…licKey.RSA.export_key when used with a private key
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.

1 participant