Branch: Tag:

2004-06-14

2004-06-14 09:14:59 by Henrik Grubbström (Grubba) <grubba@grubba.org>

ldaps support should now work again.

Rev: lib/modules/Protocols.pmod/LDAP.pmod/client.pike:1.48

2:      // LDAP client protocol implementation for Pike.   // - // $Id: client.pike,v 1.47 2003/07/01 15:21:52 anders Exp $ + // $Id: client.pike,v 1.48 2004/06/14 09:14:59 grubba Exp $   //   // Honza Petrous, hop@unibase.cz   //
360:    void create(string|void url, object|void context)    {    -  info = ([ "code_revision" : ("$Revision: 1.47 $"/" ")[1] ]); +  info = ([ "code_revision" : ("$Revision: 1.48 $"/" ")[1] ]);       if(!url || !sizeof(url))    url = LDAP_DEFAULT_URL;
406:    THROW(({"Failed to connect to LDAP server.\n",backtrace()}));    }    - #if constant(SSL.sslfile) +     if(lauth->scheme == "ldaps") { -  + #if constant(SSL.sslfile)    context->random = Crypto.randomness.reasonably_random()->read; -  ::create(SSL.sslfile(::_fd, context, 1,1)); +  ::create(SSL.sslfile(this, context, 1,1));    info->tls_version = ldapfd->version; -  } else -  ::create(::_fd); +    #else -  if(lauth->scheme == "ldaps") { -  THROW(({"LDAP: LDAPS is not available without SSL support.\n",backtrace()})); -  } -  else -  ::create(::_fd); +  error("LDAP: LDAPS is not available without SSL support.\n");   #endif -  +  } else +  ::create(::_fd);       DWRITE("client.create: connected!\n");