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.50 2003/09/01 16:36:47 nilsson Exp $ + // $Id: client.pike,v 1.51 2004/01/11 00:49:02 nilsson 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:    //! @expr{"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.50 $"/" ")[1] ]); +  info = ([ "code_revision" : ("$Revision: 1.51 $"/" ")[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:395:   #endif       if(!(::connect(lauth->host, lauth->port))) {    //errno = ldapfd->errno();    seterr (LDAP_SERVER_DOWN);    DWRITE("client.create: ERROR: can't open socket.\n");    //ldapfd->destroy();    //ldap=0;    //ok = 0;    //if(con_fail) -  // con_fail(this_object(), @extra_args); +  // con_fail(this, @extra_args);    THROW(({"Failed to connect to LDAP server.\n",backtrace()}));    }      #if 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);
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:525:    writemsg(ASN1_APPLICATION_OCTET_STRING(2, ""));       //ldap::close();       return 1;    }       void destroy() {       //send_unbind_op(); -  destruct(this_object()); +  destruct(this);    }       //!    //! Unbinds from the directory and close the connection.    int unbind () {       if (send_unbind_op() < 1) {    THROW(({error_string()+"\n",backtrace()}));    return -ldap_errno;    }