pike.git / lib / modules / Protocols.pmod / LDAP.pmod / client.pike

version» Context lines:

pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:1:   #pike __REAL_VERSION__      // LDAP client protocol implementation for Pike.   // - // $Id: client.pike,v 1.42 2002/07/31 00:18:48 nilsson Exp $ + // $Id: client.pike,v 1.43 2002/09/05 15:59:15 bill Exp $   //   // Honza Petrous, hop@unibase.cz   //   // ----------------------------------------------------------------------   //   // History:   //   // v0.0 1998-05-25 Starting up!   // v1.0 1998-06-21 Core functions (open, bind, unbind, delete, add,   // compare, search), only V2 operations,
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:353:    //! @tt{"ldap://hostname/basedn?attrlist?scope?ext"@}    //!    //! @param context    //! TLS context of connection    //!    //! @seealso    //! @[LDAP.client.bind], @[LDAP.client.search]    void create(string|void url, object|void context)    {    -  info = ([ "code_revision" : ("$Revision: 1.42 $"/" ")[1] ]); +  info = ([ "code_revision" : ("$Revision: 1.43 $"/" ")[1] ]);       if(!url || !sizeof(url))    url = LDAP_DEFAULT_URL;       lauth = parse_url(url);       if(!stringp(lauth->scheme) ||    ((lauth->scheme != "ldap")   #if constant(SSL.sslfile)    && (lauth->scheme != "ldaps")
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:406:    THROW(({"Failed to connect to LDAP server.\n",backtrace()}));    }      #ifdef constant(SSL.sslfile)    if(lauth->scheme == "ldaps") {    context->random = Crypto.randomness.reasonably_random()->read;    ::create(SSL.sslfile(::_fd, 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);   #endif       DWRITE("client.create: connected!\n");       DWRITE(sprintf("client.create: remote = %s\n", query_address()));    DWRITE_HI("client.OPEN: " + lauth->host + ":" + (string)(lauth->port) + " - OK\n");       binded = 0;       if(lauth->scope)