[PYTHON-CRYPTO] certificate verification

Simon Barber simon at SUPERDUPER.NET
Tue Nov 4 20:59:56 CET 2008


I am writing a test case, and want to verify a certificate I've made -
without using an SSL connection. I've tried following the certificate
verification example in the "OpenSSL" O'Reilly book - Is this a good
approach or is there a better way? The example code does this:

 

X509_STORE_new()

X509_STORE_load_locations()

X509_STORE_set_detault_paths()

X509_STORE_set_flags()

X509_STORE_CTX_new()

X509_STORE_CTX_init()

X509_verify_cert()

 

but some of the C functions don't appear in the M2Crypto wrappers. My first
problem is that X509.X509_Store_Context() requires a x509_store_ctx be
passed in - where do I get one? Next problem - what is the right way to call
the C functions that are not wrapped? I have my root CA cert in an X509
structure, not in a file, so I'd rather not use X509_STORE_load_locations().

 

Any help much appreciated.

 

Simon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-crypto/attachments/20081104/d8594740/attachment.html>


More information about the python-crypto mailing list