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.33 2003/12/05 14:58:08 wellhard Exp $ + // $Id: client.pike,v 1.34 2004/06/18 14:54:03 anders 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:351:    //! @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.33 $"/" ")[1] ]); +  info = ([ "code_revision" : ("$Revision: 1.34 $"/" ")[1] ]);       if(!url || !sizeof(url))    url = LDAP_DEFAULT_URL;       lauth = parse_url(url);       if(!stringp(lauth->scheme) ||    ((lauth->scheme != "ldap") && (lauth->scheme != "ldaps"))) {    THROW(({"Unknown scheme in server URL.\n",backtrace()}));    }
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:392:    DWRITE("client.create: ERROR: can't open socket.\n");    //ldapfd->destroy();    //ldap=0;    //ok = 0;    //if(con_fail)    // con_fail(this_object(), @extra_args);    THROW(({"Failed to connect to LDAP server.\n",backtrace()}));    }       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_object(), context, 1,1));    info->tls_version = ldapfd->version; -  + #else +  error("LDAP: LDAPS is not available without SSL support.\n"); + #endif    } else    ::create(::_fd);       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;