M2Crypto: X509.X509_Extension_Stack() throws AssertionError
hjtoi-better-remove-before-reply at comcast.net
Mon Aug 3 22:08:37 CEST 2009
Matthias Güntert wrote:
> Why is the following code snippet throwing an AssertionError? Is that
> behavior a bug within X509.X509_Extension_Stack()? How would you suggest
> popping every element from the stack?
> cert_extension_2 = X509.new_extension("keyUsage", "101000000")
Maybe your OpenSSL is too old. keyUsage needs to be defined in OpenSSL
obj_dat.h file for this to work.
> cert_extension_3 = X509.new_extension("subjectAlternativeName",
And I believe you mispelled this, try subjectAltName.
With the change in spelling for subjectAltName your test passes for me
using OpenSSL 1.0.0beta3 and M2Crypto 0.20beta with the (still
incomplete) patch to make M2Crypto work with OpenSSL 1.0:
Heikki Toivonen - http://heikkitoivonen.net
More information about the Python-list