blob: 0e99591f462a6bb04d97680377625c12251193b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
--- smbldap-tools-0.9.9/smbldap_tools.pl~ 2012-08-07 13:12:06.000000000 +0200
+++ smbldap-tools-0.9.9/smbldap_tools.pl 2012-12-27 15:29:06.544322290 +0100
@@ -359,12 +359,19 @@
}
if ($tls) {
- my $mesg = $ldap->start_tls(
- verify => $config{verify},
- clientcert => $config{clientcert},
- clientkey => $config{clientkey},
- cafile => $config{cafile},
- );
+ if ( defined($config{clientcert}) && defined($config{clientkey}) ) {
+ my $mesg = $ldap->start_tls(
+ verify => $config{verify},
+ clientcert => $config{clientcert},
+ clientkey => $config{clientkey},
+ cafile => $config{cafile},
+ );
+ } else {
+ my $mesg = $ldap->start_tls(
+ verify => $config{verify},
+ cafile => $config{cafile},
+ );
+ }
if ($mesg->code) {
$ldap->disconnect;
die( "Cannot start TLS on LDAP connection: $uri: " . $mesg->error . "\n");
|