Mozilla LDAP SDK Programmer's Guide/What's New In LDAP C SDK

From MozillaWiki
Jump to: navigation, search

This section compares the current version of LDAP C SDK API with the previous version.

Deprecated and Changed LDAP C SDK Features

This section covers the following changes and deprecated features in this release. Where possible, LDAP C SDK provides replacement features for deprecated features.


liblber API


The Basic Encoding Rules library, liblber, changed for portability reasons and to comply with The C LDAP Application Program Interface Internet draft. In particular, according to section 17.1., BER Data Structures and Types, the following structures have changed.

The following additional integral types are defined for use in manipula-
tion of BER encoded ASN.1 values:

typedef <impl_tag_t> ber_tag_t;     /* for BER tags */
typedef <impl_int_t> ber_int_t;     /* for BER ints, enums, and Booleans */
typedef <impl_unit_t> ber_uint_t;   /* unsigned equivalent of ber_uint_t */
typedef <impl_slen_t> ber_slen_t;   /* signed equivalent of ber_len_t */

Note that the actual definition for these four integral types is imple-
mentation specific; that is, `<impl_tag_t>', `<impl_int_t>',
`<impl_uint_t>', and `<impl_slen_t>' MUST each be replaced with an
appropriate implementation-specific type.

Programs that do not use the liblber API directly need not be changed. You can continue to build and use those applications as before.

If, however, your programs call the liblber API directly, you must change your application code to reflect the type definitions in include/lber.h. Compilers typically issue type mismatch warnings when compiling old code that has not been fixed.


File Layout


The file layout has changed. All files are unpacked in a base directory that is named according to the platform and to the operating system of the binary distribution. The file layout is covered in the section on Files Provided With LDAP C SDK.


IPv6 Support


IPv6 support is provided by means of the NSPR library. Therefore, to use LDAP over IPv6, use prldap_init instead of ldap_init.


NSS and NSPR Version Updates


This version of LDAP C SDK uses NSS 3.11 and NSPR 4.6. Both components are provided in binary form for your convenience.


NSS Security Tools


NSS security tools, used to maintain NSS databases so your application can do LDAP over SSL, are not delivered with LDAP C SDK.

For access to NSS security tools, refer to the NSS security tools project.

New LDAP C SDK Features

This section covers additional features provided in this release.


LDAP Version 3 Default


LDAP C SDK now uses LDAP v3 by default. You can therefore use LDAP v3 features in your applications even if you do not specifically set the version to 3.


Supported Controls


This version of LDAP C SDK adds support for developing client applications, including more than 10 LDAP v3 controls.

For instructions on using controls supported by LDAP C SDK, see LDAP Controls With LDAP C SDK.


Supported Extended Operations


This version of LDAP C SDK adds support for developing client applications that use the following extended operations.


LDAP Password Modify Extended Operation


The LDAP Password Modify extended operation lets your client application modify a user password through LDAP. A user can modify his password even if the password is not stored as an attribute in the directory, the user is not identified by a DN, or the user does not have an entry in the directory. The LDAP Password Modify extended operation is defined in RFC 3062.

The extended operation has identifier 1.3.6.1.4.1.4203.1.11.1.


Start TLS Extended Operation


The Start TLS extended operation lets your client application connect to a nonsecure port, and then request transport layer security.

The extended operation has identifier 1.3.6.1.4.1.1466.20037.


Who Am I? Extended Operation


The Who am I? extended operation lets your client application determine the authorization identity that the server currently associates with your client.

The extended operation has identifier 1.3.6.1.4.1.4203.1.11.3.

For instructions on using extended operations supported by LDAP C SDK, see Extended Operations With LDAP C SDK.


Additional LDAP C SDK Examples


More sample code is provided in the examples/ directory. The additional samples demonstrate newly supported controls and extended operations.