[PYTHON-CRYPTO] Bug in SSL.Context.load_verify_locations ?
Jon Ribbens
jon+pythoncrypto at UNEQUIVOCAL.CO.UK
Tue May 18 12:52:26 CEST 2004
I heve the following code:
ctx = SSL.Context("sslv3")
ctx.load_verify_locations("filename.pem")
It is failing with:
64293:error:0B064071:x509 certificate routines:ADD_CERT_DIR:invalid directory:/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/x509/by_dir.c:187:
I think this is beacuse of:
def load_verify_locations(self, cafile=None, capath=None):
return m2.ssl_ctx_load_verify_locations(self.ctx, cafile, capath or '')
You are passing an empty string to X509_STORE_load_locations, when it
should be NULL instead.
Also it might be nice if m2crypto threw an exception when OpenSSL
reported an error.
Cheers
Jon
More information about the python-crypto
mailing list