]>
Commit | Line | Data |
---|---|---|
de40a4fd JR |
1 | diff -ur smbldap-tools-0.9.6/smbldap_tools.pm y/smbldap_tools.pm |
2 | --- smbldap-tools-0.9.6/smbldap_tools.pm 2009-06-24 13:47:32.302630165 +0200 | |
3 | +++ y/smbldap_tools.pm 2009-06-25 11:46:51.000000000 +0200 | |
4 | @@ -331,12 +331,19 @@ | |
5 | "erreur LDAP: Can't contact master ldap server for writing ($@)"; | |
6 | } | |
7 | if ( $config{ldapTLS} == 1 ) { | |
8 | - $mesg = $ldap_master->start_tls( | |
9 | - verify => "$config{verify}", | |
10 | - clientcert => "$config{clientcert}", | |
11 | - clientkey => "$config{clientkey}", | |
12 | - cafile => "$config{cafile}" | |
13 | - ); | |
14 | + if ( defined($config{clientcert}) && defined($config{clientkey}) ) { | |
15 | + $mesg = $ldap_master->start_tls( | |
16 | + verify => "$config{verify}", | |
17 | + clientcert => "$config{clientcert}", | |
18 | + clientkey => "$config{clientkey}", | |
19 | + cafile => "$config{cafile}" | |
20 | + ); | |
21 | + } else { | |
22 | + $mesg = $ldap_master->start_tls( | |
23 | + verify => "$config{verify}", | |
24 | + cafile => "$config{cafile}" | |
25 | + ); | |
26 | + } | |
27 | if ( $mesg->code ) { | |
28 | die( "Could not start_tls: " . $mesg->error ); | |
29 | } |