mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ldap2: modify arguments for create_connection
* Remove unused and obsolete function arguments:
* tls_certfile
* tls_keyfile
* debug_level
* Rename tls_cacertfile to cacert (same as name in LDAPClient)
* Set cacert to constants.CACERT by default.
https://fedorahosted.org/freeipa/ticket/6461
Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
a9585ec563
commit
41098e3f7b
@@ -890,19 +890,19 @@ migration process might be incomplete\n''')
|
||||
|
||||
cacert = None
|
||||
if options.get('cacertfile') is not None:
|
||||
#store CA cert into file
|
||||
# store CA cert into file
|
||||
tmp_ca_cert_f = write_tmp_file(options['cacertfile'])
|
||||
cacert = tmp_ca_cert_f.name
|
||||
|
||||
#start TLS connection
|
||||
# start TLS connection
|
||||
ds_ldap.connect(bind_dn=options['binddn'], bind_pw=bindpw,
|
||||
tls_cacertfile=cacert)
|
||||
cacert=cacert)
|
||||
|
||||
tmp_ca_cert_f.close()
|
||||
else:
|
||||
ds_ldap.connect(bind_dn=options['binddn'], bind_pw=bindpw)
|
||||
|
||||
#check whether the compat plugin is enabled
|
||||
# check whether the compat plugin is enabled
|
||||
if not options.get('compat'):
|
||||
try:
|
||||
ldap.get_entry(DN(('cn', 'compat'), (api.env.basedn)))
|
||||
|
||||
Reference in New Issue
Block a user