[PYTHON-CRYPTO] OBJ_* ASN1_OBJECT functions

Pavel Shramov shramov at MEXMAT.NET
Fri Jul 13 10:21:01 CEST 2007


As for m2crypto revision 576 (trunk) there are no OBJ_ functions to
manipulate with ASN1_OBJECTS (OIDs). They are needed to convert
X509_Name_Entry to something usable. Since current implementation (after
r538) is much more friendly it's difficult to deal with subjects.

Maybe attached patch will be useful.

Also what's your opinion on representing X509 Name and Name Entry as
some native python data types with marshalling functions?

For example Name Entry is equivalent to native tuple of 2 elements -
OID and Data. Name is list of Name Entries. No binding to OpenSSL
except of marshalling functions for Name and NE. So one may work
with names as native types. As for current state every new
manipulation function, e.g. element deletion, must be
implemented as FFI call of OpenSSL library.

If somebody is interested in sample implementation of such approach
I may post it to list.

                                Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: objects.patch
Type: text/x-diff
Size: 3559 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-crypto/attachments/20070713/3fe7bf14/attachment.patch>


More information about the python-crypto mailing list