Use SSL/TLS when configured to do so.
[mirror/userdir-ldap-cgi.git] / search.cgi
index 96d8135..9cb62b3 100755 (executable)
@@ -84,6 +84,7 @@ if (!$dosearch) {
 
   # Now, we are ready to connect to the LDAP server.
   $ldap = Net::LDAP->new($config{ldaphost}) || &Util::HTMLError($!);
+  &Util::UpgradeConnection($ldap) unless $config{usessl} eq 'False';
   my $auth = 0;
   my $mesg;