check method of private keys
Bug #376051 reported by
rick_dean
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyOpenSSL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Here is a patch to implement the RSA key checking functionality
of "openssl rsa -in somekey.pem -check -noout".
The openssl library (and applications) do not have the equivalent
functionality for DSA private keys, so attempting to check one produces
a TypeError exception.
Automated unit test cases are included, but I don't actually
have an inconsistent RSA key to test with, so the
failure explanation is not as detailed as the openssl app.
Related branches
Changed in pyopenssl: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This patch add support for "openssl rsa -noout -modulus" and
"openssl dsa -noout -modulus". The patch applies on to of the
"-check" patch.
X509 seem to use "get_" in it's method names, but
PKey does not (see type()). This patch continues that
convention, but I'm open to change.
This patch duplicates the _runopenssl() function
definition in it's test case, but there is clearly
a better solution, although it would be
harder to merge.