Description: Windows SDK package needed
Fix Description: 1) Update the packaging Makefile (package.mk) for Windows and SASL.
2) Add support for manifests in VC 8.0. There is a new command line tool
called mt.exe that is used to generate manifest files and to compile them into
the executables. This allows ldapsearch.exe to be able to find the right
msvcr80.dll at runtime. This was copied from NSS at Nelson's suggestion.
3) Added support for being able to do a configure and make in a different
directory. I find it very useful to be able to create a "build" directory and
run configure like this:
cd ~/build
/path/to/mozilla/directory/c-sdk/configure ... args ...
make
Then I can just completely blow away the build directory if I need to. I know
this is what make clean/make clobber are supposed to do, but keeping the binary
and source directories separate like this also facilitates creating source
tarballs from the working directory for use in building rpms/packages.
There were a few changes required to cygwin_wrapper and the makefiles to
support building in this manner.
git-svn-id: svn://10.0.0.236/trunk@228387 18797224-902f-48f8-a5cc-f745e15eee43
Description: Merge sun libprldap changes on to trunk
Fix Description: Pretty much the same as the fixes made for bugs 352519 352673 on the sun_merge_branch_20060523, this just merges those changes on to the trunk. One additional change is the removal of an unused variable.
git-svn-id: svn://10.0.0.236/trunk@213108 18797224-902f-48f8-a5cc-f745e15eee43
Description: Merge sun_merge_branch_20060523 changes into trunk.
Fix Description: I had to change re_encode_request to use the new ber types. Other than that, these merges are basically the sasl, ipv6, and ber types code already committed to the sun merge branch.
git-svn-id: svn://10.0.0.236/trunk@213085 18797224-902f-48f8-a5cc-f745e15eee43
Description: Memleak: ldap_start_tls_s should free oidptr and dataptr
Fix Description: Just omit oidptr and dataptr and pass NULL for those arguments to ldap_extended_operation_s().
Bug: 348927
Description: Memleak: ldaptls_complete should free hostlist
Fix Description: Instead of returning directly from early error conditions, just goto the error handling code, and let that code free hostlist and do the other cleanup. I had to make sure all relevant variables were initialized to NULL in order for cleanup to work properly.
git-svn-id: svn://10.0.0.236/trunk@207762 18797224-902f-48f8-a5cc-f745e15eee43
Description: The client must call ldapssl_enable_clientauth before the first operation. This means before ldap_start_tls_s in the case of startTLS. However, the certname and keypassword (if any) are stored in the connection context. ldapssl_enable_clientauth will now allocate and store this connection context if it doesn't already exist, then set the certname and keypassword.
git-svn-id: svn://10.0.0.236/trunk@206564 18797224-902f-48f8-a5cc-f745e15eee43
Fix Description: Replaced PK11_FindCertFromNickname() with CERT_FindUserCertByUsage(), using a cert usage of SSL Client. This should only find certs that are used for SSL Clients, which is the type of cert we want in this context (as opposed to e.g. an email signing cert). The LDAPSSLSessionInfo* ssip is passed now as the context argument. Moved calling PK11_SetPasswordFunc before CERT_FindUserCertByUsage() in case CERT_FindUserCertByUsage() needs it for some reason.
git-svn-id: svn://10.0.0.236/trunk@206431 18797224-902f-48f8-a5cc-f745e15eee43
Enable autoconf build on Windows with cygwin and free MSVC compiler + SDK
1) Don't set the -lsvrcore in SVRCORE_LIBS in configure - instead, do it the
way we do the NSPR and NSS libs, in build.mk
2) For the component LINK macros, use name.lib instead of -lname on Windows
3) The new free MSVC compiler does not have lib.exe - add an autoconf test for
the lib program and use link /lib if missing
4) If using MSVC (which expects DOS style absolute paths) and cygwin (which
uses unix style abs. paths), use cygpath -m on all user supplied paths to make
sure they are in the correct format for cl and link. It's better to do this
during configure rather than depend on cygwin_wrapper which is much, much
slower.
5) Don't link with the odbc libs (Why did we ever need these!?!??!?)
6) The free MSVC doesn't include afxwin.h, so use the other header files
instead
7) Add libutil to the Windows build, including getting rid of the old Makefile
and adding a new Makefile.in for the autoconf build (the Makefile.client
remains)
8) getopt.c doesn't need lber.h
I verified that these changes also build on Win2k with MSVC 6 SP 3. I also changed the copyright in the new Makefile.in as suggested by Mark Smith.
git-svn-id: svn://10.0.0.236/trunk@188870 18797224-902f-48f8-a5cc-f745e15eee43
Mem and resource leaks in ldapsinit.c
1) I'm pretty sure the reference to socket should be fd instead. I don't know
why it compiled with socket in there . . . note to self: read compiler warnings
. . .
2) The cert returned by SSL_PeerCertificate is "dup"ed, so we need to call
CERT_DestroyCertificate to release it otherwise we'll leak references.
3) The hostname returned by SSL_RevealURL is strduped and must be freed.
Reviewed by Mark and Pete (Thanks!)
git-svn-id: svn://10.0.0.236/trunk@187706 18797224-902f-48f8-a5cc-f745e15eee43
Reviewed by Mark, Dan, Chris (Thanks!)
The newly added README.rpm explains how to build an RPM.
Running ./configure will print the list of flags and what they do.
git-svn-id: svn://10.0.0.236/trunk@187352 18797224-902f-48f8-a5cc-f745e15eee43
Thanks to Howard Chu <hyc@symas.com> for the patches.
Bug #294122 r=cls a=shaver
git-svn-id: svn://10.0.0.236/trunk@174037 18797224-902f-48f8-a5cc-f745e15eee43
LDAP command line tools now accept 2 new options:
-ZZ (issue a startTLS request)
-ZZZ (like -ZZ but require a successful response).
API extensions:
ldap_ssl.h: LDAP_EXOP_START_TLS macro (OID of start TLS extended op.).
libssldap: Added ldap_start_tls_s() function.
libprldap: Added prldap_is_installed() and prldap_import_connection().
libldap: Added new LDAP_X_OPT_SOCKETARG option for ldap_get_option()
and ldap_set_option() (get/set the socketarg associated
with the main LDAP TCP connection).
liblber: Added new LBER_SOCKBUF_OPT_SOCK_ARG option for
ber_sockbuf_set_option() and ber_sockbuf_get_option()
(get/set the socketarg associated with a Sockbuf).
Also, some refactoring was done in libssldap to simplify the code.
git-svn-id: svn://10.0.0.236/trunk@161997 18797224-902f-48f8-a5cc-f745e15eee43
Updated NSPR and NSS component revision numbers.
Handle for part release numbers on Linux, e.g., 2.4.20-6
Use correct paths for NSPR headers and libraries.
Remove obsolete LDAP Makefiles (generated by configure these days).
Fix command line tools link error on Linux: link with -lstdc++
git-svn-id: svn://10.0.0.236/trunk@156843 18797224-902f-48f8-a5cc-f745e15eee43
Replace existing licenses with a triple license (NPL/GPL/LGPL or
MPL/GPL/LGPL).
Add licenses to files that had no license.
Remove two unused files.
git-svn-id: svn://10.0.0.236/trunk@147837 18797224-902f-48f8-a5cc-f745e15eee43
The LDAP tools code no longer has any knowledge of the NSS
file names; the certpath2keypath() function has been deleted
and we now simply use the certdbpath as keydbpath when it is
provided (it makes no difference in the end). But note that
because we need to maintain backwards compatibility, the
libssldap code used by the ldapssl_.*_init() functions still
knows the default name of the NSS module file (secmod.db),
and the code also relies on the fact that the suffix for the
key and cert files is ".db" and that the first letter in the
main part of the name is either 'c' or 'k'.
Also fixed a bug that caused the module file name specified on
the LDAP tools command line (-m name) to be ignored.
The ldapsearch and ldapcmp tools now exit with LDAP_NO_MEMORY
if an LDIF fragment can't be constructed.
Also fixed some issues reported by lint:
Return values that were ignored.
Make more functions and global variables static.
Add /*ARGSUSED*/ and similar lint-friendly comments.
git-svn-id: svn://10.0.0.236/trunk@139935 18797224-902f-48f8-a5cc-f745e15eee43
If a NULL keypasswd value is passed to ldapssl_enable_clientauth()
then it is assumed that the application has already unlocked
the key DB or has installed its own GetPassword callback.
Also improved some error reporting.
git-svn-id: svn://10.0.0.236/trunk@134796 18797224-902f-48f8-a5cc-f745e15eee43
Added two new libssldap public functions: ldapssl_set_option() and
ldapssl_get_option().
Also fixed a bug in ldapsinit:do_ldapssl_connect() that sometimes
caused PR_Close() to be called twice on an SSL file descriptor
if an error occurred (once in do_ldapssl_connect() itself and
once in the libprldap close function that is called from
do_ldapssl_connect()).
Also updated the NSPR and NSS "error code to string" mapping
tables that are used by ldapssl_err2string().
Also fixed a bug in common.c:ldaptool_print_lderror (LDAP command
line tools) where we did not check for SSL errors when the
error code was "can't connect." We were only checking on
"server down" errors.
git-svn-id: svn://10.0.0.236/trunk@124204 18797224-902f-48f8-a5cc-f745e15eee43
New libssldap public function: ldapssl_set_strength().
New command line tool option: -3 ("no third").
Fix bug # 134035 - LDAP command line tools don't report vendor mismatch.
Improved error checks and reporting for SSL errors in tools.
git-svn-id: svn://10.0.0.236/trunk@119280 18797224-902f-48f8-a5cc-f745e15eee43
ldapcsdk_50_client_branch between ldapcsdk_50_client_base
and ldapcsdk_50_client_branch-20020417-pre-trunk-merge.
git-svn-id: svn://10.0.0.236/trunk@119250 18797224-902f-48f8-a5cc-f745e15eee43