Support modifying and exporting PKCS12

Bug #349304 reported by rick_dean on 2009-03-27
2
Affects Status Importance Assigned to Milestone
pyOpenSSL
Fix Released
Undecided
Unassigned

Bug Description

This patch adds support for modifying and exporting PKCS12.
The automated unit tests need some certificates from the
patch of https://bugs.launchpad.net/pyopenssl/+bug/348577
so this patch applies on top of that one.

rick_dean (rick-fdd) wrote :

This patch applies on top of the patch above. It
removes one debugging print that was accidentally
left in the patch. It also allows passphrase=None to
be treated like a missing passphrase or passphrase="".
There is a new test case for that too.

rick_dean (rick-fdd) wrote :

Apparently python 2.4 doesn't have Py_ssize_t which is the
return type for PySequence_GetItem() in 2.5. This patch
replaces that type to match int of previous releases
as I believe we are trying to support compatability back
to 2.3. Apply the patch over the one above.

I'm sure there is a better way to do this, such as
a preprocessor directive that is aware of the python
version, and defines Py_ssize_t when need be.

rick_dean (rick-fdd) wrote :

Oops. Py_ssize_t is the return type of PySequence_Length()
not PySequence_GetItem().

I wish this bug tracker numbered comments so I could indicate
which one I was referring to (#3 from the permalink).

rick_dean (rick-fdd) wrote :

Here is the better patch to replace comment 3. It
enhances src/pymemcompat.h to define the new
data type in python < 2.5.

rick_dean (rick-fdd) wrote :

I ported the changes to the tip of trunk, updated the documentation,
made PKCS12 a type just like most other objects, eliminated
Popen from the test cases, and fixed a warning. This branch is ready for merge.
lp:~rick-fdd/pyopenssl/pkcs12_mod_and_export2

Changed in pyopenssl:
status: New → Fix Committed
Changed in pyopenssl:
milestone: none → 0.10
Changed in pyopenssl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers