Use SSL/TLS when configured to do so.
[mirror/userdir-ldap-cgi.git] / update.cgi
index e1f7c96..676d2d7 100755 (executable)
@@ -36,6 +36,7 @@ sub DieHandler {
 $SIG{__DIE__} = \&DieHandler;
 
 $ldap = Net::LDAP->new($config{ldaphost});
+&Util::UpgradeConnection($ldap) unless $config{usessl} eq 'False';
 my $auth = 0;
 my $mesg;
 $mesg = $ldap->bind($editdn, password => $password);