[python-ldap] Python LDAP TLS error when ldap.OPT_X_TLS_REQUIRE_CERT set to ldap.OPT_X_TLS_NEVER
Michael Ströder
michael at stroeder.com
Thu Jun 30 17:42:25 EDT 2016
Daniel Watrous wrote:
> self.ld.set_option(ldap.OPT_X_TLS_CACERTFILE,
> self.configuration['verify_ssl']['use'])
> print "ldap.OPT_X_TLS_CACERTFILE = %d" %
> ldap.OPT_X_TLS_CACERTFILE
> else:
> self.ld.set_option(ldap.OPT_X_TLS_REQUIRE_CERT,
> ldap.OPT_X_TLS_NEVER)
> print "ldap.OPT_X_TLS_REQUIRE_CERT = %d" %
> ldap.OPT_X_TLS_REQUIRE_CERT
> print "ldap.OPT_X_TLS_NEVER = %d" % ldap.OPT_X_TLS_NEVER
> #ldap.set_option(ldap.OPT_X_TLS_NEWCTX, 0)
If you want to set connection-specific TLS parameters you must use
self.ld.set_option(ldap.OPT_X_TLS_NEWCTX, 0)
as last call to setoption() with TLS parameter.
Ciao, Michael.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4245 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20160630/b654f14c/attachment.bin>
More information about the python-ldap
mailing list