Commit Graph

187 Commits

Author SHA1 Message Date
Yang Tse 92433e596b We use this ZERO_NULL to avoid picky compiler warnings,
when assigning a NULL pointer to a function pointer var.
2007-10-17 16:58:32 +00:00
Patrick Monnerat 07b6e7363d Added per-protocol callback static tables, replacing callback ptr storage
in the connectdata structure by a single handler table ptr.
2007-10-12 13:36:37 +00:00
Yang Tse 43e8f00861 lber.h needs to be included since ldap.h might not include it 2007-10-09 23:51:55 +00:00
Gunter Knauf 0cc9122093 added check for MSVC6 standard PSDK and bail out since insufficient for LDAP support with current code. 2007-10-09 23:25:58 +00:00
Yang Tse a137109a0c <winber.h> needed for Windows LDAP client 32 API support 2007-10-02 14:48:38 +00:00
Gunter Knauf b41e65a8e3 fixed ldap support for winldap. 2007-09-15 20:03:03 +00:00
Gunter Knauf 327c0d6b1c bail out with error if someone tries to use another cert than PEM with OpenLDAP. 2007-08-25 12:10:30 +00:00
Gunter Knauf 2d8dba388b added support for CA cert verification;
default now to verify cert unless data->set.ssl.verifypeer is 0.
2007-08-23 00:10:56 +00:00
Gisle Vanem d38891c950 Reversed the 'HAVE_LDAP_URL_PARSE' ifdef statement. 2007-08-22 18:05:46 +00:00
Gunter Knauf 5b4f50857a for now comment the tls_start section... 2007-08-22 10:14:57 +00:00
Gunter Knauf fa1c916943 fixed warning with unused var;
removed now obsolete defines since we include now ldap headers which define these.
2007-08-20 23:31:26 +00:00
Gunter Knauf acb905231d fixed ldaps section for OpenLDAP. Still not working, but at least it compiles now, and should serve as base to get it finally working. Also seems that the ifdefs can be arranged some better because the Solaris and Netscape/iPlanet/Mozilla LDAP SDKs seem to be closer to the Novell section than the OpenLDAP one. 2007-08-20 16:30:41 +00:00
Gunter Knauf 29ac001aa6 fixed warning about uninitialized. 2007-08-16 15:23:39 +00:00
Gunter Knauf ccba0d10b6 added basic ldaps support; for now its ifdef'd with HAVE_LDAP_SSL unless we know its fully working, and available with all LDAP SDKs.
Win32 requires to have the trusted CA in local keystore - I've not found yet a way to disable the cert check.
2007-08-16 14:08:47 +00:00
Gunter Knauf e5d8693865 added ldap_msgfree() to fix memory leak. 2007-08-15 08:18:37 +00:00
Dan Fandrich 8ee5e95ab1 Removed unused variable. 2007-08-13 16:37:51 +00:00
Patrick Monnerat 22c61d8da6 Simplify and rename internal structure to avoid potential name clash with LDAP header file. 2007-08-13 13:03:08 +00:00
Daniel Stenberg 1b88990cbb Fixed the LDAP_DEPRECATED #define as suggested by Daniel Johnson, and
indented some of the code to curl-style
2007-08-12 22:25:50 +00:00
Daniel Stenberg d0edb47896 Patrick Monnerat modified the LDAP code and approach in curl. Starting now,
the configure script checks for openldap and friends and we link with those
libs just like we link all other third party libraries, and we no longer
dlopen() those libraries. Our private header file lib/ldap.h was renamed to
lib/curl_ldap.h due to this. I set a tag in CVS (curl-7_17_0-preldapfix)
just before this commit, just in case.
2007-08-11 20:57:54 +00:00
Yang Tse b66def2b4c Emmanuel Dreyfus fixed not being able to find ber_free() in
libldap when available in liblber.
2007-03-12 05:09:25 +00:00
Gisle Vanem c514a2a89a Removed inclusion of <sys/types.h> and <sys/stat.h> in .c-files
since they're already included through "setup.h".
2007-02-26 04:24:26 +00:00
Daniel Stenberg 359d500908 - David McCreedy made changes to allow base64 encoding/decoding to work on
non-ASCII platforms.
2007-01-03 23:04:38 +00:00
Yang Tse ba481718a4 Make more human readable and maintainable previous
compiler warning fix since it was Ok and actually
avoids the targeted compiler warning.
2006-10-29 14:58:59 +00:00
Yang Tse a93695a70e Compiler warning fix.
Assigning the const value zero to a pointer to function
results in a null pointer value assignment to the function
pointer.

Assignment of any nonzero value is what should result in a
implementation compiler dependent result.

Since what we want to do here is the first case, this should
not trigger compiler warnings related with conversions from
'pointer to data' to 'pointer to function'.

Our autobuild test suite will judge.
2006-10-27 15:32:18 +00:00
Yang Tse 772a985dc3 Update copyright year, since the file has been modified 2006-10-27 03:47:57 +00:00
Yang Tse 8a8d5c784c Do an explicit typecast of data pointers to function pointers
to avoid picky compiler warnings, since this is what we want!
2006-10-27 01:04:41 +00:00
Gisle Vanem be1306a6c2 Update comment reflecting structure change. 2006-09-08 12:17:58 +00:00
Gisle Vanem 0a670c578f Compilation fix; 'reqdata' is not a pointer. 'path' is part of SessionHandle. 2006-09-08 12:03:39 +00:00
Yang Tse dc7c915553 Compilation fix 2006-09-08 05:18:07 +00:00
Daniel Stenberg b7eeb6e67f Major overhaul introducing http pipelining support and shared connection
cache within the multi handle.
2006-09-07 21:49:20 +00:00
Daniel Stenberg cfdcae4bc7 Based on a patch by Armel Asselin, the FTP code no longer re-issues the TYPE
command on subsequent requests on a re-used connection unless it has to.
2006-08-19 21:18:36 +00:00
Yang Tse 13616f8f96 Simplify check for NEED_MALLOC_H, and make more explicit that NEED_MALLOC_H shall be defined if <malloc.h> header file must be included even when including <stdlib.h>. 2006-07-25 13:49:49 +00:00
Yang Tse fe22872d14 include <malloc.h> only if HAVE_MALLOC_H and NEED_MALLOC_H are both defined. 2006-07-11 21:34:23 +00:00
Gisle Vanem 3cbb1b2b64 Use the HAVE_MALLOC_H and HAVE_PROCESS_H defines
(more logical).
2006-04-26 17:23:28 +00:00
Gisle Vanem 35b4a755f9 curl_easy_unescape() takes 4 arguments. 2006-04-08 11:01:40 +00:00
Daniel Stenberg 5a4b43848a First commit of David McCreedy's EBCDIC and TPF changes. 2006-04-07 21:50:47 +00:00
Yang Tse d6c5d24af3 Cleanup windows header includes. Where aplicable, inclusion of
windows.h winsock.h winsock2.h ws2tcpip.h is done in setup.h
2005-12-18 15:36:14 +00:00
Gisle Vanem 6b1e54da62 Use an empty '*mod_name'. 2005-11-01 16:27:27 +00:00
Daniel Stenberg b91421b107 Vilmos Nebehaj improved libcurl's LDAP abilities:
The LDAP code in libcurl can't handle LDAP servers of LDAPv3 nor binary
attributes in LDAP objects. So, I made a quick patch to address these
problems.

The solution is simple: if we connect to an LDAP server, first try LDAPv3
(which is the preferred protocol as of now) and then fall back to LDAPv2.
In case of binary attributes, we first convert them to base64, just like the
openldap client does. It uses ldap_get_values_len() instead of
ldap_get_values() to be able to retrieve binary attributes correctly. I
defined the necessary LDAP macros in lib/ldap.c to be able to compile
libcurl without the presence of libldap
2005-10-31 08:55:01 +00:00
Dan Fandrich 205f8b266c Fixed LDAP library file name bug (KNOWN_BUGS #1). configure now auto-detects
the correct dynamic library names by default, and provides override switches
--with-ldap-lib, --with-lber-lib and --without-lber-lib.  Added
CURL_DISABLE_LDAP to platform-specific config files to disable LDAP
support on those platforms that probably don't have dynamic OpenLDAP
libraries available to avoid compile errors.
2005-03-11 05:28:07 +00:00
Gisle Vanem 32d76a5b57 Set 'bits.close' in case of malloc fail.
Don't free 'lud_dn' twice in case curl_unescape()
fails.
2005-02-09 14:28:35 +00:00
Daniel Stenberg 6a2e21ec8c FTP code turned into state machine. Not completely yet, but a good start.
The tag 'before_ftp_statemachine' was set just before this commit in case
of future need.
2005-02-09 13:06:40 +00:00
Gisle Vanem 41e776f9db Fix calling convention of wlap32.dll function. Watcom
uses fastcall by default, so force cdecl.
2004-12-17 17:54:21 +00:00
Dan Fandrich f23d923fd3 Only declare static variables if they're needed. Fixed some compile warnings. 2004-12-14 20:44:36 +00:00
Daniel Stenberg 24d47a6e07 Paul Nolan fix to make libcurl build nicely on Windows CE 2004-11-02 10:12:22 +00:00
Daniel Stenberg 39af394a1c removed tabs and trailing whitespace from source 2004-10-06 07:50:18 +00:00
Daniel Stenberg cb80670885 Ben Greear's minor fix to build (better) with cross-compiled(?) mingw 2004-09-26 06:53:53 +00:00
Daniel Stenberg 7676f40218 jean-claude Chauve fixed an LDAP bug 2004-09-22 08:01:41 +00:00
Daniel Stenberg b9f76f11bb typecast long => int conversion 2004-07-04 21:38:36 +00:00
Daniel Stenberg 4345c7a712 Gisle: minor fix 2004-05-13 10:38:57 +00:00
Daniel Stenberg bbafb2eb27 curl_global_init_mem() allows the memory functions to be replaced.
memory.h is included everywhere for this.
2004-05-11 11:30:23 +00:00
Daniel Stenberg 9f660862ec unused variable removed 2004-05-06 07:22:32 +00:00
Daniel Stenberg 6bdcfecbcf Joe Halpin fixed the warning on the typecast from data pointer to function
pointer!
2004-05-05 14:08:52 +00:00
Daniel Stenberg e7ee1ccf45 Gisle fixed the problem with ldap_search_s() fails with "filter error": a case
of using 'lud_filter' after freeing 'lud_dn'.
2004-05-03 15:01:34 +00:00
Daniel Stenberg d42dcd60cd Gisle Vanem:
Patch for ldap.c under Windows. It works with wldap32.dll as supplied with
Win-98/ME/2000/XP, so no extra .dlls are required.  I've mostly tested it
against Verisign's ldap server. Added code in the case there are to many
responses (rc = LDAP_SIZELIMIT_EXCEEDED) and print only those we got. E.g.

curl
ldap://directory.verisign.net/?cn,display-name,mail,info?subtree?(cn=*Nelson*)

will print the first 10 results.

My only problem with it is that ldap_search_s() fails with "filter error" when
CURLDEBUG is defined ?! Maybe someone can spot the error.
2004-05-03 09:14:12 +00:00
Daniel Stenberg 4b9f8e766d Made host name and proxy name get stored in a 'struct hostname' and set
all things up to work with encoded host names internally, as well as keeping
'display names' to show in debug messages. IDN resolves work for me now using
ipv6, ipv4 and ares resolving. Even cookies on IDN sites seem to do right.
2004-04-27 13:56:23 +00:00
Daniel Stenberg 52caba0417 removed the ldaptext variable, it was only set and never used 2004-02-12 09:51:43 +00:00
Daniel Stenberg 83e878420a Make sure DynaGetFunction() returns a function pointer, not a data pointer.
The standards don't actually allow typecasts between data and functions so
some picky compilers warn about this.
2004-02-06 07:28:49 +00:00
Daniel Stenberg 4d17d6876e Dan Fandrich's cleanup patch to make pedantic compiler options cause less
warnings. Minor edits by me.
2004-01-29 13:56:45 +00:00
Daniel Stenberg 053f6c85ef updated year in the copyright string 2004-01-07 09:19:33 +00:00
Daniel Stenberg 070cd2b52f Henrik Storner's update to make libcurl work with OpenLDAP 2.1.22 (current).
Also reported to work with OpenLDAP 2.0.26.
2003-09-01 08:23:31 +00:00
Daniel Stenberg 52b631fade Access the user and passwd fields from the connectdata struct now instead
of the sessionhandle struct, as that was not good.
2003-07-19 23:56:33 +00:00
Daniel Stenberg 5931d53637 Gisle Vanem found a lib handle leak in the ldap code 2003-07-01 10:12:52 +00:00
Daniel Stenberg a7c72b7abf removed the local variables for emacs and vim, use the new sample.emacs
way for emacs, and vim users should provide a similar non-polluting style
2003-01-29 10:14:20 +00:00
Daniel Stenberg f26a338a54 copyright year update in the source header 2003-01-16 21:08:12 +00:00
Daniel Stenberg ba4e69bebc updated source code boilerplate/header 2002-09-03 11:52:59 +00:00
Daniel Stenberg 20f85b94df kris@freebsd.org fixed a bad format string 2002-06-12 07:45:11 +00:00
Daniel Stenberg 08ef208fb7 added disable-[protocol] support, largely provided by Miklos Nemeth 2002-06-11 11:13:01 +00:00
Daniel Stenberg 974f314f57 copyright string (year) update 2002-03-19 07:54:55 +00:00
Daniel Stenberg 2a0cde3041 adjusted after Ramana Mokkapati's comments 2001-11-07 09:39:49 +00:00
Daniel Stenberg 08ad385e0e Ramana Mokkapati did some good bug hunting, and we these fixes ldap transfers
should work a lot better!
2001-11-05 14:04:57 +00:00
Daniel Stenberg d733061873 bug report #474568 -
We need to set "no further data to download" before the Curl_ldap() function
returns, as otherwise it'll hang on that assumed transfer.
2001-10-25 08:28:29 +00:00
Sterling Hughes 8e91d5de8e looks nicer and is better compatible with older vim versions 2001-10-11 09:32:19 +00:00
Sterling Hughes 6147879837 Added formatting sections for emacs and vim 2001-09-07 04:01:32 +00:00
Daniel Stenberg 0ece1b5c34 Major rename and redesign of the internal "backbone" structs. Details will
be posted in a minute to the libcurl list.
2001-08-30 22:48:34 +00:00
Daniel Stenberg b1c57788f3 const-ified the code, removed Curl_ldap_done() 2001-08-14 08:30:43 +00:00
Daniel Stenberg a1d6ad2610 multiple connection support initial commit 2001-02-20 17:35:51 +00:00
Daniel Stenberg 4031104404 Internal symbols that aren't static are now prefixed with 'Curl_' 2001-01-05 10:11:41 +00:00
Daniel Stenberg 24dee483e9 dual-license fix 2001-01-03 09:29:33 +00:00
Daniel Stenberg 526eca191a uses client_write() 2000-11-22 12:55:24 +00:00
Daniel Stenberg b6e18f2f66 #include "setup.h" moved first of all includes 2000-08-24 14:26:33 +00:00
Daniel Stenberg 1ef3600a07 haxx.nu => haxx.se 2000-06-20 15:31:26 +00:00
Daniel Stenberg e27e490c7e oops 2000-05-22 19:09:31 +00:00
Daniel Stenberg dbd864a2a6 adjusted to work even without RTLD_GLOBAL defined 2000-05-22 19:04:18 +00:00
Daniel Stenberg 96dde76b99 moved here from the newlib branch 2000-05-22 14:12:12 +00:00
Daniel Stenberg de275780a9 Support for systems where RTLD_LAZY_GLOBAL is defined instead of
RTLD_GLOBAL and RTLD_LAZY separately.
2000-05-09 22:23:55 +00:00
Daniel Stenberg ae1912cb0d Initial revision 1999-12-29 14:20:26 +00:00