I am trying to add SSL support to our existing application's use of the 
Mozilla LDAP C SDK, but have not been able to build the libraries.  I would 
appreciate it if someone could point me in the right direction.

Background:
We have an application program, written in C, that we build on Solaris 8 (to 
support 8, 9, and 10), HP-UX 11i, and Windows XP (to support 2000, XP, and 
2003) using MS VC 6.0.  About four years ago we added user password checking 
via LDAP, calling ldap_simple_bind_s().  We downloaded the source tar-ball 
for the Mozilla LDAP C SDK version 1.7.2 and built it on all three 
platforms.  We now want to add the option of connecting to the LDAP server 
over SSL.  So I have downloaded the version 1.7.13 tar-ball and tried to 
build the libraries, following the instructions I found on the Web pages.

First question:  Is building from the 1.7.13 source tar-ball the best 
approach for using the C SDK for LDAP support with and without SSL on these 
three platforms?

Second question:  If this is the right approach, what do I need to do to get 
it to compile?  Here is what I have done so far, working on Windows first. 
(Previous, non-SSL experience showed that building on UNIX is a snap once I 
get Windows to work.)

What works - non-SSL:
1. Install Cygwin, but rename its link.exe to something else.
2. Download 
http://ftp.mozilla.org/pub/mozilla.org/mozilla/source/wintools.zip and 
install in C:\moztools.
3. Install MS Macro ASM 6.11 (just in case it turns out I need it)
4. Prepare command window for use:
4.1  Run VCVARS32.BAT to set path for running VC 6.0 components.
4.2  Run cygwin.bat
4.3  Source in a file that sets environment variables:
      MOZ_TOOLS=C:\\moztools
      export MOZ_TOOLS
      
PATH=${PATH}:/cygdrive/c/MASM611/BIN:/cygdrive/c/moztools/bin:/cygdrive/c/cygwin/bin:.
5. Unpack the source tar-ball by:  tar -xvf mozilla-1.7.13-source.tar
6. Build and install NSPR:
6.1  Build it:
      cd mozilla/nsprpub
      configure --enable-optimize --disable-debug
      gmake
      cd pr/tests
      gmake
      cd ../../../..
6.2 Install the resulting files where they will be needed:
      mkdir mozilla/dist/include
      ### copy the tree mozilla/nsprpub/dist/include/nspr to 
mozilla/dist/include/nspr
      mkdir mozilla/dist/lib
      cp mozilla/nsprpub/dist/lib/* mozilla/dist/lib
7. Build the C SDK
7.1 First follow the instructions:
      cd mozilla/directory/c-sdk
      configure --enable-optimize --disable-debug
      gmake
7.2 Compensate for incompatibility between gmake and Active Perl
      ### when the perl command that creates ldap-standard.h hangs, 
interrupt it with Ctrl+C
      cd ldap/include
      ### copy+paste the perl command and execute it
      cd ../..
      gmake

What fails - trying to include SSL
Steps 1 - 6 = same as above
7. Build and install NSS
7.1 Build:
      cd mozilla/securitiy/nss
      gmake nss_build_all
      cd ../../..
7.2 Install the resulting files where they will be needed:
      mkdir mozilla/dist/public mozilla/dist/public/securitiy
      cp mozilla/security/nss/lib/*/*.h mozilla/dist/public/security
8. Build the C SDK
    This is the same as non-SSL step 7 but with the addition of "--with-nss" 
to the configure command.
The gmake dies after the link command that makes nsldapssl32v50.dll fails 
with error:
      LINK : fatal error LNK1181: cannot open input file 
"../../../../../dist/lib/nss3.lib"

I thought this library would be produced by building in 
mozilla/security/manager.  So I did:
     configure --enable-crypto
in the base mozilla directory and then went to mozilla/security/manager and 
ran gmake, but that also fails.

Thank you in advance for help and advice.

Dennis Darch
SofTech, Inc.


_______________________________________________
dev-tech-ldap mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-ldap

Reply via email to