LDAP C SDK: Difference between revisions

8,874 bytes added ,  13 October 2017
No edit summary
 
(27 intermediate revisions by 6 users not shown)
Line 2: Line 2:
Contact: Mark Smith <[mailto:mcs@pearlcrescent.com mcs@pearlcrescent.com]>
Contact: Mark Smith <[mailto:mcs@pearlcrescent.com mcs@pearlcrescent.com]>
Discussion: [news://news.mozilla.org/mozilla.dev.tech.ldap mozilla.dev.tech.ldap]
Discussion: [news://news.mozilla.org/mozilla.dev.tech.ldap mozilla.dev.tech.ldap]
===Latest News - 10/13/2017===
To my knowledge, the LDAP C SDK is no longer being actively developed.
However, the LDAPJDK is still in use in various projects, and the source for all LDAP SDKS has been moved to the following URLS:
* New Source Location: [https://github.com/dogtagpki/ldap-sdks https://github.com/dogtagpki/ldap-sdks]
Additionally, all future issues with the LDAPJDK should be filed against the following URL (rather than the Mozilla Bugzilla LDAPJDK component):
* New Ticket Location: [https://pagure.io/ldapjdk/ https://pagure.io/ldapjdk/]
===Latest News - 1/31/2011===
Version 6.0.7 has been released!  This version contains several bug fixes. [http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=DirectorySDKSourceC&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2008-09-12+00%3A00%3A00&maxdate=2010-11-11+00%3A00%3A00&cvsroot=%2Fcvsroot Here] and [https://hg.mozilla.org/projects/ldap-sdks/pushloghtml?tochange=LDAPCSDK_6_0_7_RTM here] are the lists of changes made since 6.0.6 was released. The hg tags are LDAPCSDK_6_0_7_RTM and LDAPCSDK_20110106_607_RTM.  The source tarball is here: ftp://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v6.0.7/src
===Latest News - 12/1/2010===
The LDAP repositories have now moved to a [https://developer.mozilla.org/en/Mercurial Mercurial] [http://hg.mozilla.org/projects/ldap-sdks/ installation]. All development will now take place in that hg repository.
There are two active branches: 'default' (equivalent to the old cvs HEAD), and 'devel-branch-1_4_2' a branch for perldap that was present in cvs.
===Latest News - 6/3/2009===
Mozldap now supports the MozillaBuild environment for building on Windows platforms.  The code is currently in CVS HEAD.
More information about setting up the Windows environment is here - https://developer.mozilla.org/En/Developer_Guide/Build_Instructions/Windows_Prerequisites
Here is the link to the MozillaBuild package - http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.3.exe
===Latest News - 9/11/2008===
Version 6.0.6 has been released!  This version contains several bug fixes. [http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=DirectorySDKSourceC&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2008-01-03+00%3A00%3A00&maxdate=2008-09-11+00%3A00%3A00&cvsroot=%2Fcvsroot Here] is the list of changes made since 6.0.5 was released.  The CVS tags are LDAPCSDK_6_0_6_RTM and LDAPCSDK_6_0_6_RTM_20080911.  The source tarball is here: ftp://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v6.0.6/src
===Latest News - 1/3/2008===
Version 6.0.5 has been released!  This version contains several bug fixes. [http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=DirectorySDKSourceC&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2007-07-05+00%3A00%3A00&maxdate=2008-01-03+00%3A00%3A00&cvsroot=%2Fcvsroot Here] is the list of changes made since 6.0.4 was released.  The CVS tag is LDAPCSDK_6_0_5_RTM.  The source tarball is here: ftp://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v6.0.5/src
===Latest News - 7/5/2007===
Version 6.0.4 has been released!  This version has support for using CMU SASL on Windows, and creating a Windows .zip package, as well as many bug fixes.  [http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=DirectorySDKSourceC&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2007-03-09+00%3A00%3A00&maxdate=2007-07-05+00%3A00%3A00&cvsroot=%2Fcvsroot Here] is the list of changes made since 6.0.3 was released.  The CVS tags are LDAPCSDK_6_0_4_RTM and LDAPCSDK_20070705_604_RTM.  The source tarball is here: ftp://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v6.0.4/src
Sun has released their updated SDK documentation.  This is now in mozilla CVS under mozilla/directory/docs.  These are in DocBook 4.3 XML format.
===Latest News - 3/13/2007===
Version 6.0.3 has been released!  This version mostly contains some fixes for building on Windows and other platforms.  [http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=DirectorySDKSourceC&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2007-01-17+00%3A00%3A00&maxdate=2007-03-08+00%3A00%3A00&cvsroot=%2Fcvsroot Here] is the list of changes made since 6.0.2 was released.  The CVS tags are LDAPCSDK_6_0_3_RTM and LDAPCSDK_20070313_603_RTM.  The source tarball is here: ftp://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v6.0.3/src
===Latest News - 1/17/2007===
Version 6.0.2 has been released!  This version contains the completed merge of the Sun LDAP C SDK back into Mozilla.  This version also exports libldif as a public interface and shared library.  Now you can get rid of that old, crufty LDIF parsing code you've been maintaining :-)  The CVS tag is LDAPCSDK_6_0_2_RTM.  You can find the source here:
ftp://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v6.0.2/src


===Latest News - 10/12/2006===
===Latest News - 10/12/2006===
Line 19: Line 64:


===Latest news (updated 5/10/2005)===
===Latest news (updated 5/10/2005)===
The latest release is 5.16. This release contains a fix for using startTLS with the command line tools as well as some configuration and Makefile changes for building with gcc on Solaris (32 bit and 64 bit) - bugs 291993, 293042, and 293199. The CVS tag is LDAPCSDK_5_1_6_RTM.
The latest release is 5.16. This release contains a fix for using startTLS with the command line tools as well as some configuration and Makefile changes for building with gcc on Solaris (32 bit and 64 bit) - bugs [https://bugzilla.mozilla.org/show_bug.cgi?id=291993 291993], [https://bugzilla.mozilla.org/show_bug.cgi?id=293042 293042], and [https://bugzilla.mozilla.org/show_bug.cgi?id=293199 293199]. The CVS tag is LDAPCSDK_5_1_6_RTM.


The previous release was 5.15, CVS tag LDAPCSDK_5_1_5_RTM.
The previous release was 5.15, CVS tag LDAPCSDK_5_1_5_RTM.
Line 28: Line 73:
==Documentation==
==Documentation==


* [[LDAPCSDKBinaryPackaging]] - Describes the format of the binary packages and the process for building those packages
* [http://www.mozilla.org/directory/csdk-docs/ Mozilla LDAP C SDK Programmer's Guide]
* [http://www.mozilla.org/directory/csdk-docs/ Mozilla LDAP C SDK Programmer's Guide]
* [http://www.mozilla.org/directory/ietf-docs/draft-ietf-ldapext-ldap-c-api-05.txt C LDAP API Internet Draft]
* [http://www.mozilla.org/directory/ietf-docs/draft-ietf-ldapext-ldap-c-api-05.txt C LDAP API Internet Draft]
* [http://www.mozilla.org/directory/sourcedocs.html Source Code Documentation]
* [[LDAPCSDKSourceCodeDoc|Source Code Documentation]]


==Checking Out the Source Code==
==Checking Out the Source Code==


# Get the CVS client and set your computer up mozilla work. Read through the instructions on using CVS. Make sure you have set your CVSROOT environment variable and that you have successfully executed the cvs login command.
# Get the CVS client and set your computer up mozilla work. [http://www.mozilla.org/cvs.html Read through the instructions] on using CVS. Make sure you have set your CVSROOT environment variable and that you have successfully executed the cvs login command.
# Pull the current LDAP C SDK code (which is located on the CVS trunk) using this command: cvs co -P [-r currentrelease] DirectorySDKSourceC The most current release is LDAPCSDK_6_0_0_RTM, so to pull this version (recommended), use this command: cvs co -P -r LDAPCSDK_6_0_0_RTM DirectorySDKSourceC
# Pull the current LDAP C SDK code (which is located on the CVS trunk) using this command: cvs co -P [-r currentrelease] DirectorySDKSourceC The most current release is LDAPCSDK_6_0_6_RTM, so to pull this version (recommended), use this command: cvs co -P -r LDAPCSDK_6_0_6_RTM DirectorySDKSourceC
# Pull the code for libraries that LDAP C SDK depends on. Pull NSPR, NSS, and DBM (used by NSS) using these commands:
# Pull the code for libraries that LDAP C SDK depends on. Pull [http://www.mozilla.org/projects/nspr/ NSPR] and [http://www.mozilla.org/projects/security/pki/nss/ NSS] using these commands:


  cvs co -r NSPR_4_6_3_RTM mozilla/nsprpub
  cvs co mozilla/nsprpub
  cvs co -r NSS_3_11_3_RTM mozilla/security/coreconf mozilla/security/nss mozilla/security/dbm mozilla/dbm
  cvs co mozilla/security/coreconf mozilla/security/nss mozilla/security/dbm mozilla/dbm


There is an optional package called SVRCORE which provides secure PIN management for the command line and Windows clients. This is recommended for using the command line tools with SSL, for a more secure environment.
There is an optional package called SVRCORE which provides secure PIN management for the command line and Windows clients. This is recommended for using the command line tools with SSL, for a more secure environment.


  cvs co -r SVRCORE_4_0_2_RTM mozilla/security/svrcore [mozilla/security/coreconf]
  cvs co mozilla/security/svrcore [mozilla/security/coreconf]


Add mozilla/security/coreconf if you didn't checkout NSS. Alternatively, you can download stable binary releases of NSPR and NSS and drop them into your source tree under mozilla/dist.  See ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/ for NSPR releases and ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/ for NSS releases.
Add mozilla/security/coreconf on Windows only. Alternatively, you can [ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/ download stable binary releases of NSPR] and [ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/ NSS] and drop them into your source tree under mozilla/dist.  See ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/ for NSPR releases and ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/ for NSS releases.


===Obtaining Build Tools and Setting Up Your Environment===
===Obtaining Build Tools and Setting Up Your Environment===
Line 51: Line 97:
Follow these instructions to obtain the necessary build tools:
Follow these instructions to obtain the necessary build tools:


* Microsoft Windows
* [http://developer.mozilla.org/en/Windows_Build_Prerequisites Microsoft Windows]
* Linux and Unix  
** Note: CVS HEAD can now use MozillaBuild which is based on msys
** Latest MozillaBuild - http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.3.exe
* [http://developer.mozilla.org/en/Linux_Build_Prerequisites Linux and Unix]


Follow these instructions to set up your environment:
Follow these instructions to set up your environment:


* Microsoft Windows - Note that MOZCONFIG is not used for LDAP C SDK builds, so it is safe to leave it unset.
* [http://www.mozilla.org/build/win32.html#software Microsoft Windows]
** If building LDAP C SDK 6.0.5 or older, follow the instructions below - they do not apply if using MozillaBuild with msys, they assume the use of cygwin
** Note that MOZCONFIG is not used for LDAP C SDK builds, so it is safe to leave it unset.
** Also note that the only mozilla build program you should use is nsinstall.exe - DO NOT USE THE OTHER TOOLS TO BUILD THE STANDALONE LDAP C SDK - just put nsinstall.exe somewhere in your PATH
** If you get strange errors from link, you may have to remove the cygwin "link" command
* Solaris using GCC (instead of the Sun/Forte compiler)
* Solaris using GCC (instead of the Sun/Forte compiler)
** Requires GCC 3.4 or later
** Requires GCC 3.4 or later
Line 62: Line 114:
** LD_LIBRARY_PATH must include the libgcc and libstdc++ libraries - note that if you are building 64 bit binaries, you must use the 64 bit libraries in the lib/sparcv9 directory instead of the 32 bit versions in the lib directory.
** LD_LIBRARY_PATH must include the libgcc and libstdc++ libraries - note that if you are building 64 bit binaries, you must use the 64 bit libraries in the lib/sparcv9 directory instead of the 32 bit versions in the lib directory.
** Use CXX=g++ CC=gcc when calling configure - also add CXXFLAGS=-m64 CFLAGS=-m64 if building 64 bit binaries  
** Use CXX=g++ CC=gcc when calling configure - also add CXXFLAGS=-m64 CFLAGS=-m64 if building 64 bit binaries  
* Other Linux and Unix. No environment variables need to be set.  
* Other Linux and Unix. No environment variables need to be set.


===Building using autoconf (preferred method)===
===Building using autoconf (preferred method)===
NOTE: You must use GNU make (called gmake on some platforms).
NOTE: You must use GNU make (called gmake on some platforms).


# Build NSPR and NSS (if not using binary releases of those components) by executing these commands:
* Build NSPR and NSS (if not using binary releases of those components) by executing these commands:
  cd mozilla/security/nss
  cd mozilla/security/nss
  make nss_build_all [USE_64=1]
  make nss_build_all [USE_64=1]
# [Optional - see above] Build the SVRCORE module:
* [Optional - see above] Build the SVRCORE module:
  cd mozilla/security/svrcore
  cd mozilla/security/svrcore
./configure [--with-nspr=/path] [--with-nss=/path]
  make [USE_64=1]
  make [USE_64=1]
# Read the NSS Build Instructions and the NSPR Build Instructions if you run into problems. Note that the instructions for NSS say to use the NSS_3_9_RTM tag to pull the source, but use NSS_3_11_RTM instead. Build the LDAP C SDK libraries:
Note that since svrcore requires NSS, --with-svrcore implies --with-nss
* Read the [http://www.mozilla.org/projects/security/pki/nss/nss-3.9/nss-3.9-build.html NSS Build Instructions] and the [http://www.mozilla.org/projects/nspr/eng-process/build.html NSPR Build Instructions] if you run into problems. Note that the instructions for NSS say to use the NSS_3_9_RTM tag to pull the source, but use NSS_3_11_4_RTM instead. Build the LDAP C SDK libraries:
  cd mozilla/directory/c-sdk
  cd mozilla/directory/c-sdk
  ./configure --with-nss [--enable-64bit]
  ./configure --with-nss [--enable-64bit]
  make [USE_64=1]
  make
# Build the LDAP C SDK libraries and command line tools:
* Build the LDAP C SDK libraries and command line tools:
  cd mozilla/directory/c-sdk
  cd mozilla/directory/c-sdk
  ./configure --with-nss --enable-clu [--enable-64bit]
  ./configure --with-nss --enable-clu [--enable-64bit]
  make [USE_64=1]
  make
# Build the LDAP C SDK libraries and command line tools with SVRCORE:
* Build the LDAP C SDK libraries and command line tools with SVRCORE:
  cd mozilla/directory/c-sdk
  cd mozilla/directory/c-sdk
  ./configure --with-svrcore --enable-clu [--enable-64bit]
  ./configure --with-svrcore --enable-clu [--enable-64bit]
  make [USE_64=1]
  make
# Build with SASL support:
* Build with SASL support:
 
:::SASL support requires Cyrus SASL or vendor compatible implementation available on the target system. some OS ship with SASL library and plug-ins at standard locations, for instance on Solaris 10 and Linux all you have to do is to specify --with-sasl so autoconf will look for it in all the standard locations. for any OS that does not ship SASL as part of its distribution you might wanna check if there are any SASL packages available separately either by OS vendor or trusted third party and if none available you can build Cyrus SASL from the source which also can be a preferred option in cases when you require certain SASL library or plug-ins customization to suit your needs.
 
:::information on obtaining Cyrus SASL source can be found at http://asg.web.cmu.edu/sasl/sasl-library.html
:::information on building, using and troubleshooting Cyrus SASL is included within its source distribution.
 
:::at the time of this writing cyrus-sasl-2.1.22 is the latest version available and can be build using the following options:
 
cd cyrus-sasl-2.1.22
./configure --enable-gssapi --without-des --without-openssl --without-saslauthd \
  --disable-ldapdb --with-dblib=none --prefix=DIR --enable-shared \
  --disable-static
 
:::where prefix option will vary to fit your own installation path. --with-plugindir=DIR option can be used if you do not plan to install SASL plug-ins at default location [/usr/lib/sasl2], otherwise SASL_PATH environment variable can be used by Cyrus SASL at runtime to determine the location of its plug-ins.
 
:::also note that default set of plug-ins will vary depending on platform. LDAP C SDK does not require any plug-ins in order to be build with SASL support however you need to make sure that specific plug-ins for SASL mechanisms you will use at runtime are available at the plug-in location.
 
:::Cyrus SASL libraries and headers installed at standard location/s:
 
  cd mozilla/directory/c-sdk
  cd mozilla/directory/c-sdk
  ./configure ...other options above... --with-sasl
  ./configure ...other options above... --with-sasl
Note that since svrcore requires NSS, --with-svrcore implies --with-nss
 
:::OR Cyrus SASL libraries and headers installed at non standard location/s:
 
cd mozilla/directory/c-sdk
./configure ...other options above... --with-sasl-inc=DIR/include/sasl --with-sasl-lib=DIR/lib
 
====Building Cyrus SASL on Windows====
Building Cyrus SASL on Windows requires some special instrctions - see [[LDAP_C_SDK_SASL_Windows]] for more information and required patches.


If your build is successful, the LDAP C SDK libraries, command line tools, and header files will be placed under mozilla/dist/<OSNAME>.OBJ/.
If your build is successful, the LDAP C SDK libraries, command line tools, and header files will be placed under mozilla/dist/<OSNAME>.OBJ/.


If you like, you can run an acceptance test. (How?)
Note that you can build without SSL support by skipping the NSS related build steps and omitting the --with-nss on the configure command. You will still need a binary copy of NSPR or you will need to build NSPR from source.
 
Note that you can build without SSL support by skipping the NSS related build steps and omitting the --with-nss on the configure command. You will still need a binary copy of NSPR or you will need to build NSPR from source.  


===Building without using autoconf (deprecated - older method - use autoconf method)===
===Building without using autoconf (deprecated - older method - use autoconf method)===
Line 109: Line 187:


If your build is successful, the LDAP C SDK libraries, command line tools, and header files will be placed under mozilla/dist/<OSNAME>.OBJ/.
If your build is successful, the LDAP C SDK libraries, command line tools, and header files will be placed under mozilla/dist/<OSNAME>.OBJ/.
If you like, you can run an acceptance test. (How?)


==More Information==
==More Information==


If you have questions or want to discuss issues about the LDAP C SDK or any of the Mozilla LDAP source products, post a message to the mozilla.dev.tech.ldap newsgroup.
If you have questions or want to discuss issues about the LDAP C SDK or any of the Mozilla LDAP source products, post a message to the [news://news.mozilla.org/mozilla.dev.tech.ldap mozilla.dev.tech.ldap] newsgroup.


For more information about the available newsgroups and mailing lists, see the Mozilla community page
For more information about the available newsgroups and mailing lists, see the [http://www.mozilla.org/community.html Mozilla community page].
1

edit