Discussion:
library
Friedrich Locke
2015-11-04 12:41:41 UTC
Permalink
Hi folks,

i would like to write a library that implements ldap client connection to
the server, as usual, the default routines:

connect
bind
search
unbind
etc ...

I wonder if there is a documentation showing how data is encoded with asn.1
ber encoding.

Thanks a lot.
Howard Chu
2015-11-04 13:15:12 UTC
Permalink
Content preview: Friedrich Locke wrote: > Hi folks, > > i would like to write
a library that implements ldap client connection to the > server, as usual,
the default routines: For simple ops this isn't a big task, but when you
add referrals to the mix it gets a bit messier. [...]

Content analysis details: (-4.2 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium
trust
[69.43.206.106 listed in list.dnswl.org]
0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked.
See
http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
for more information.
[URIs: itu.int]
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
Post by Friedrich Locke
Hi folks,
i would like to write a library that implements ldap client connection to the
For simple ops this isn't a big task, but when you add referrals to the mix it
gets a bit messier.

Here's some design points to keep in mind so you don't make the same mistakes
as current libldap does.

http://scratchpad.wikia.com/wiki/LDAP_C_API
Post by Friedrich Locke
connect
bind
search
unbind
etc ...
I wonder if there is a documentation showing how data is encoded with asn.1
ber encoding.
Rules for BER are in X.690. You can download the latest spec for free from the
ITU-T.

http://www.itu.int/rec/T-REC-X.690/en
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
Hallvard Breien Furuseth
2015-11-04 13:29:31 UTC
Permalink
Content preview: On 04. nov. 2015 13:41, Friedrich Locke wrote: > (...) > I
wonder if there is a documentation showing how data is encoded with asn.1
ber encoding. Look up "A Layman's Guide to a Subset of ASN.1, BER, and
DER" for an intro to those. It's a bit sloppy, but OK for LDAP. The ASN.1
grammar or LDAPv3 is mostly in RFC 4511. [...]

Content analysis details: (-4.2 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium
trust
[129.240.10.17 listed in list.dnswl.org]
0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
(...)
I wonder if there is a documentation showing how data is encoded with asn.1
ber encoding.
Look up "A Layman's Guide to a Subset of ASN.1, BER, and DER"
for an intro to those. It's a bit sloppy, but OK for LDAP.
The ASN.1 grammar or LDAPv3 is mostly in RFC 4511.

OpenLDAP's liblber (lber.h) takes care of encoding/decoding.
See man -k lber, and man ber_printf and ber_scanf, among others.
--
Hallvard
Loading...