37 Commits

Author SHA1 Message Date
nelson%bolyard.com
ed1126d939 Bug 485690: LDAP SSL connections with clientauth sometimes use wrong credentials
r=Mark Smith


git-svn-id: svn://10.0.0.236/trunk@257854 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-29 21:43:27 +00:00
bugzilla%standard8.plus.com
35c76a5546 Follow up to Bug 385091 - fix build problems on msys compilers/MozillaBuild. p=Neil,r=Rich Megginson
git-svn-id: svn://10.0.0.236/trunk@254163 18797224-902f-48f8-a5cc-f745e15eee43
2008-09-11 14:38:35 +00:00
richm%stanfordalumni.org
f3d3c9eaac Resolves: bug 386091
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
2007-06-20 17:57:12 +00:00
anton.bobrov%sun.com
1e79648fe9 Bug 355244 merging Sun and Mozilla libssldap
git-svn-id: svn://10.0.0.236/trunk@213412 18797224-902f-48f8-a5cc-f745e15eee43
2006-10-10 13:37:35 +00:00
richm%stanfordalumni.org
5490d18a0f Bug: 339298
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
2006-10-04 14:37:27 +00:00
richm%stanfordalumni.org
0cc7de0f1b Bug: 339298
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
2006-10-03 20:43:42 +00:00
richm%stanfordalumni.org
f1ced83b02 Bug: 348926
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
2006-08-17 19:21:03 +00:00
richm%stanfordalumni.org
8b7e2cbc94 Bug: 347033
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
2006-08-04 14:05:38 +00:00
richm%stanfordalumni.org
86c3ab791d Bug: 201483
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
2006-08-02 20:00:42 +00:00
richm%stanfordalumni.org
8112151948 On HP-UX, we should not link against the libraries we depend on at runtime because it puts explicit version dependencies into the shared library we are creating. This makes it impossible to upgrade to a new version of nspr or nss.
git-svn-id: svn://10.0.0.236/trunk@190307 18797224-902f-48f8-a5cc-f745e15eee43
2006-02-16 23:08:22 +00:00
richm%stanfordalumni.org
4e0cb6e9fc bug 301035 and bug 325518
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
2006-02-03 19:28:32 +00:00
richm%stanfordalumni.org
9f0ab5ffa2 bug 323374
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
2006-01-17 14:53:57 +00:00
richm%stanfordalumni.org
7c7a7c10ca Bug 322618 - Enable RPM build
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
2006-01-11 20:20:13 +00:00
richm%stanfordalumni.org
508a7b3b9c fixes for bug 322576 - patches for building on HP-UX IPF
git-svn-id: svn://10.0.0.236/trunk@187185 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-09 20:08:59 +00:00
cls%seawood.org
da2cda38ed Path translation fixes for msys.
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
2005-06-02 04:21:17 +00:00
richm%stanfordalumni.org
ae660cedf5 fix for 291993: find the NSPR libraries in the correct location in the dist build tree and make prldap have a run time dependency on them
git-svn-id: svn://10.0.0.236/trunk@173259 18797224-902f-48f8-a5cc-f745e15eee43
2005-05-10 20:08:48 +00:00
richm%stanfordalumni.org
5822174eaf Fix for bug 290482 - add the -l directive to fix the broken linker command
git-svn-id: svn://10.0.0.236/trunk@172699 18797224-902f-48f8-a5cc-f745e15eee43
2005-04-25 20:03:49 +00:00
mcs%pearlcrescent.com
7d734689e8 Additional fix for 141754 - Enhancement: Should support startTls:
Remove extra semicolon which causes an error on some non-gcc compilers.


git-svn-id: svn://10.0.0.236/trunk@162072 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-10 13:03:03 +00:00
mcs%pearlcrescent.com
b8044053ec Fix bug # 141754 - Enhancement: Should support startTLS.
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
2004-09-09 18:50:05 +00:00
mcs%pearlcrescent.com
6b1abbdd28 Fix bug # 184219 - get cvs version of Ldap C-SDK and make of ldap c sdk failed.
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
2004-05-24 13:03:16 +00:00
cls%seawood.org
e6112a42c4 Gratuitous whitespace change to represent checkin for bug 53764.
git-svn-id: svn://10.0.0.236/trunk@153968 18797224-902f-48f8-a5cc-f745e15eee43
2004-03-15 06:13:51 +00:00
mcs%netscape.com
17a1191dbb Additional fix for bug # 205419 - Relicense LDAP C SDK (directory/c-sdk).
Replace NPL/GPL/LGPL licenses with MPL/GPL/LGPL.


git-svn-id: svn://10.0.0.236/trunk@147988 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 17:26:10 +00:00
mcs%netscape.com
f9cbc32e48 Fix bug # 205419 - Relicense LDAP C SDK (directory/c-sdk).
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
2003-10-10 15:03:52 +00:00
mcs%netscape.com
5076ab7942 Fix 126462 - Occurences of uninitialized variables being used
before being set (in directory/c-sdk).


git-svn-id: svn://10.0.0.236/trunk@140157 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-24 19:59:05 +00:00
mcs%netscape.com
b9b47058f3 Fix 183385 - eliminate references to NSS key/cert/module files.
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
2003-03-21 16:00:34 +00:00
seawood%netscape.com
88a13bdac8 Add mingw support.
Bug #134113 r=mcs sr=dmose


git-svn-id: svn://10.0.0.236/trunk@139107 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-07 21:12:09 +00:00
djani%netscape.com
72066a575b Bug 179133: Now we support cert and key DBs with prefixes in the names also, just like ldapssl_pkcs_init() does. Now all of the code calls NSS_Initialize() instead of NSS_Init().
git-svn-id: svn://10.0.0.236/trunk@134802 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-04 19:10:17 +00:00
mcs%netscape.com
cc5865f4c9 Fix bug # 177771 - libssldap: keyfile password should be optional.
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
2002-12-04 17:11:20 +00:00
mcs%netscape.com
2967118f83 Fix bug # 163534 - remove Netscape Confidential and Proprietary marker
from errormap.c.


git-svn-id: svn://10.0.0.236/trunk@133920 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-15 20:18:50 +00:00
mcs%netscape.com
b7046746c2 Fix bug # 153250 - need a way to set SSL options when using libssldap.
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
2002-06-27 19:26:38 +00:00
dmose%netscape.com
f1bd22715a Fix clean/clobber targets to properly remove shared and static libraries (bug 136651). Patch from Philip K. Warren <pkw@austin.ibm.com>; r=dmose@netscape.com; sr=sspitzer@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@120281 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 03:40:22 +00:00
dmose%netscape.com
4eea0e428a Fix memory leak in libssldap and an incorrect error return in libprldap (bug 137017). r=mcs@netscape.com
git-svn-id: svn://10.0.0.236/trunk@120270 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-30 01:23:58 +00:00
dmose%netscape.com
df786edb35 Reinstate real_install target so that it will be possible to have an install target for Mozilla that works as expected (bug 138442); patch from Chris Seawood <cls@seawood.org>, r=dmose@netscape.com, mcs@netscape.com
git-svn-id: svn://10.0.0.236/trunk@119786 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-24 23:53:23 +00:00
mcs%netscape.com
0c1f40ad50 Fix bug # 132040 - LDAP tools need a "no man in the middle" option.
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
2002-04-18 18:53:19 +00:00
mcs%netscape.com
fabb0d49a2 Revise SSL layer comment
git-svn-id: svn://10.0.0.236/trunk@119271 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-18 15:30:22 +00:00
mcs%netscape.com
b4b052bbff Merge onto the trunk all changes made on
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
2002-04-17 21:53:50 +00:00
dmose%netscape.com
4680f8f4d7 LDAP C SDK v5.0 merge from ldapcsdk_branch_50 (at ldapcsdk_branch_50-20020326-pre-trunk-merge-tag).
git-svn-id: svn://10.0.0.236/trunk@117510 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-26 21:54:41 +00:00