Add dump_publickey as a complement for dump_privatekey
Bug #780089 reported by
Adi Roiban
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyOpenSSL |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The pyOpenSSL API already has a crypto.
It would be nice to also have a dump_publickey method.
I will attach a branch with an initial implementation of this method (only PEM format).
If this change is wanted, I can improve the branch.
Cheers
Related branches
lp:~shanemhansen/pyopenssl/dump_publickey
Ready for review
for merging
into
lp:~exarkun/pyopenssl/trunk
- Jean-Paul Calderone: Needs Fixing
-
Diff: 180 lines (+119/-1)3 files modifiedOpenSSL/crypto/crypto.c (+56/-0)
OpenSSL/test/test_crypto.py (+54/-1)
doc/api/crypto.rst (+9/-0)
Changed in pyopenssl: | |
milestone: | none → 0.13 |
status: | New → Confirmed |
To post a comment you must log in.
Hi,
Do you have any comments about how you would like to bug solved?
I reported this bug while I was looking for a way to generate SSH public and private keys from Python without external calls to openssh-keygen or openssl.
My first stop was pyOpenSSL since I knew that OpenSSH is using openssl.
Later I found the code from twisted. conch.ssh. key and used the Key class to generate my public and private keys in the OpenSSH format.
I am willing to continue implementing the crypto. dump_privatekey API, but after learning more about pyOpenSSL I was thinking that it would be better to export the key elements in PKey and the dump_privakekey could use them to dump the key in various formats.