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.13 2000/02/12 10:57:02 hop Exp $ + // $Id: client.pike,v 1.14 2000/02/17 17:59:53 hop 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:39:   // - 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.13 2000-02-12 - fixed search NOT op bug (end revision normalized)   // + // v1.14 2000-02-17 - added decoding of UTF8 strings for v3 protocol + //   // 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)   //   // Interesting, applicable
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:124:    mapping attrs;       foreach(ar, string raw1) {    attrs = (["dn":({ASN1_DECODE_DN(raw1)})]);    entry1 = ASN1_GET_ATTR_ARRAY(raw1);    foreach(entry1, object attr1) {    attrs += ([ASN1_GET_ATTR_NAME(attr1):_get_attr_values(attr1)]);    }    res += ({attrs});    } +  +  if(ldap_version == 3) { +  // deUTF8 +  res = Array.map(res, utf8_to_string); +  } +     return (res);    } // _New_decode       object|int create(array rawres, int|void stuff) {    // rawres: array of result in raw format, but WITHOUT LDAP PDU !!!    // stuff: 1=bind result; ...       int lastel = sizeof(rawres) - 1;       if (lastel < 0) {