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

version» Context lines:

pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:1:   // LDAP client protocol implementation for Pike.   // - // $Id: client.pike,v 1.1 1999/04/24 16:43:28 js Exp $ + // $Id: client.pike,v 1.2 1999/08/16 00:47:16 peter 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:37:   // (ASN.1 LDAP-related classes and hacks)   // - changed default of 'ldap_scope' to 0   // - search filter now correctly processed '\(' & '\)'   // [! Still unimplemented escaped conditions chars!]   //   // v1.10 1999-03-28 - moved core to the new 'protocol' code   // 1999-03-28 - rewritten ldap_[op] startup code   //   // v1.11 1999-04-10 - search filter now processed multiple wild '*' chars   // [ Escaping untested, yet ] + // v1.12 1999-06-26 - fixed bug in decoding search result, now correctly + // returned also first attribute (Thx Marten Svanfeldt)   //   // Specifications:   //   // RFC 1558 (search filter representations)   // RFC 1777,1778,1779 (version2 spec)   // RFC 1823 (v2 API)   // RFC 2251,2252,2253,2254,2255,2256 (version3 spec)   // draft-ietf-asid-ldap-c-api-00.txt (v3 API)   // RFC2279 (UTF-8)   //
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:65:      // ------------------------      // ASN.1 decode macros   #define ASN1_DECODE_RESULTAPP(X) (.ldap_privates.ldap_der_decode(X)->elements[1]->get_tag())   #define ASN1_DECODE_RESULTCODE(X) (int)(.ldap_privates.ldap_der_decode(X)->elements[1]->elements[0]->value->cast_to_int())   #define ASN1_DECODE_RESULTSTRING(X) (.ldap_privates.ldap_der_decode(X)->elements[1]->elements[1]->value)   #define ASN1_DECODE_ENTRIES(X) _New_decode(X)   #define ASN1_DECODE_DN(X) (string)(.ldap_privates.ldap_der_decode(X)->elements[1]->elements[0]->value)   #define ASN1_DECODE_RAWDEBUG(X) (.ldap_privates.ldap_der_decode(X)->debug_string()) - #define ASN1_GET_ATTR_ARRAY(X) (array)(.ldap_privates.ldap_der_decode(X)->elements[1]->elements[1]->elements[1..]) + #define ASN1_GET_ATTR_ARRAY(X) (array)(.ldap_privates.ldap_der_decode(X)->elements[1]->elements[1]->elements)   #define ASN1_GET_ATTR_NAME(X) ((X)->elements[0]->value)       inherit .protocol;       private int binded = 0; // flag for v2 operations    private string ldap_basedn = ""; // baseDN    private int ldap_scope = 0; // 0: base, 1: onelevel, 2: subtree    private int ldap_deref = 0; // 0: ...    private int ldap_sizelimit = 0;    private int ldap_timelimit = 0;
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:445:       } // compare       private int|string send_add_op(string dn, mapping(string:array(string)) attrs) {    // ADD       object msgval;    string atype;    array(object) oatt = ({});    + DWRITE_HI(sprintf("client.ADD: DEB: %O\n", attrs));    foreach(indices(attrs), atype) {    string aval;    array(object) ohlp = ({});       foreach(values(attrs[atype]), aval)    ohlp += ({Standards.ASN1.Types.asn1_octet_string(aval)});    oatt += ({Standards.ASN1.Types.asn1_sequence(    ({Standards.ASN1.Types.asn1_octet_string(atype),    Standards.ASN1.Types.asn1_set(ohlp)    }))