Bug in SSL.Context.load_verify_locations ?

Jon Ribbens <[email protected]>
Newsgroups gmane.comp.python.cryptography
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.