update ooo310-m15
[ooovba.git] / neon / neon.patch
blobb62a64ab23f4bbfb225f3a4c00c23af147e8b8ef
1 --- misc/neon-0.28.2/src/config.h 2008-08-25 14:36:05.062500000 +0200
2 +++ misc/build/neon-0.28.2/src/config.h 2008-08-25 14:32:17.656250000 +0200
3 @@ -1 +1,479 @@
4 -dummy
6 +/* Define to specific EGD socket path */
7 +/* #undef EGD_PATH */
9 +/* Define if EGD should be supported */
10 +/* #undef ENABLE_EGD */
12 +/* Define if GSS_C_NT_HOSTBASED_SERVICE is not defined otherwise */
13 +/* #undef GSS_C_NT_HOSTBASED_SERVICE */
15 +/* Define to 1 if you have the <arpa/inet.h> header file. */
16 +#ifdef UNX
17 +#define HAVE_ARPA_INET_H 1
18 +#endif
20 +/* Define to 1 if you have the `bind_textdomain_codeset' function. */
21 +/* #undef HAVE_BIND_TEXTDOMAIN_CODESET 1 */
23 +/* Define to 1 if you have the declaration of `h_errno', and to 0 if you
24 + don't. */
25 +#ifdef WIN32
26 +#define HAVE_DECL_H_ERRNO 1
27 +#endif
29 +/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
30 + */
31 +#ifdef LINUX
32 +#define HAVE_DECL_STPCPY 1
33 +#endif
35 +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
36 + don't. */
37 +#ifdef LINUX
38 +#define HAVE_DECL_STRERROR_R 1
39 +#endif
41 +/* Define to 1 if you have the <dlfcn.h> header file. */
42 +#ifdef UNX
43 +#define HAVE_DLFCN_H 1
44 +#endif
46 +/* Define to 1 if you have the <errno.h> header file. */
47 +#define HAVE_ERRNO_H 1
49 +/* Define if you have expat */
50 +/* #undef HAVE_EXPAT */
52 +/* Define to 1 if you have the `fstat64' function. */
53 +#define HAVE_FSTAT64
55 +/* Define to 1 if you have the `gai_strerror' function. */
56 +#define HAVE_GAI_STRERROR 1
58 +/* Define if GnuTLS support is enabled */
59 +/* #undef HAVE_GNUTLS */
61 +/* Define to 1 if you have the `gnutls_session_get_data2' function. */
62 +/* #undef HAVE_GNUTLS_SESSION_GET_DATA2 */
64 +/* Define if GSSAPI support is enabled */
65 +/* #undef HAVE_GSSAPI */
67 +/* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */
68 +/* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */
70 +/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
71 +/* #undef HAVE_GSSAPI_GSSAPI_H */
73 +/* Define to 1 if you have the <gssapi.h> header file. */
74 +/* #undef HAVE_GSSAPI_H */
76 +/* Define to 1 if you have the `gss_init_sec_context' function. */
77 +/* #undef HAVE_GSS_INIT_SEC_CONTEXT */
79 +/* Define to 1 if you have the `hstrerror' function. */
80 +/* #undef HAVE_HSTRERROR */
82 +/* Define to 1 if you have the `inet_ntop' function. */
83 +#ifdef UNX
84 +#define HAVE_INET_NTOP 1
85 +#endif
87 +/* Define to 1 if you have the <inttypes.h> header file. */
88 +#ifdef UNX
89 +#define HAVE_INTTYPES_H 1
90 +#endif
92 +/* Define to 1 if you have the `isatty' function. */
93 +#define HAVE_ISATTY 1
95 +/* Define to 1 if you have the <libintl.h> header file. */
96 +/* #undef HAVE_LIBINTL_H */
98 +/* Define if you have libxml */
99 +#define HAVE_LIBXML 1
101 +/* Define to 1 if you have the <libxml/parser.h> header file. */
102 +#define HAVE_LIBXML_PARSER_H 1
104 +/* Define to 1 if you have the <libxml/xmlversion.h> header file. */
105 +#define HAVE_LIBXML_XMLVERSION_H 1
107 +/* Define to 1 if you have the <limits.h> header file. */
108 +#define HAVE_LIMITS_H 1
110 +/* Define to 1 if you have the <locale.h> header file. */
111 +#define HAVE_LOCALE_H 1
113 +/* Define to 1 if you have the `lseek64' function. */
114 +#define HAVE_LSEEK64 1
116 +/* Define to 1 if you have the <memory.h> header file. */
117 +#define HAVE_MEMORY_H 1
119 +/* Define to 1 if you have the <netdb.h> header file. */
120 +#ifdef UNX
121 +#define HAVE_NETDB_H 1
122 +#endif
124 +/* Define to 1 if you have the <netinet/in.h> header file. */
125 +#ifdef UNX
126 +#define HAVE_NETINET_IN_H 1
127 +#endif
129 +/* Define to 1 if you have the <netinet/tcp.h> header file. */
130 +#ifdef UNX
131 +#define HAVE_NETINET_TCP_H 1
132 +#endif
134 +/* Define if OpenSSL support is enabled */
135 +/* #undef HAVE_OPENSSL */
136 +#define HAVE_OPENSSL
137 +/* Define to 1 if you have the <openssl/opensslv.h> header file. */
138 +/* #undef HAVE_OPENSSL_OPENSSLV_H */
139 +#define HAVE_OPENSSL_OPENSSLV_H 1
140 +/* Define to 1 if you have the <openssl/ssl.h> header file. */
141 +/* #undef HAVE_OPENSSL_SSL_H */
142 +#define HAVE_OPENSSL_SSL_H 1
143 +/* Define to 1 if you have the `pipe' function. */
144 +#define HAVE_PIPE 1
146 +/* Define to 1 if you have the `poll' function. */
147 +#define HAVE_POLL 1
149 +/* Define to 1 if you have the `pthread_mutex_init' function. */
150 +/* #undef HAVE_PTHREAD_MUTEX_INIT */
152 +/* Define to 1 if you have the `pthread_mutex_lock' function. */
153 +/* #undef HAVE_PTHREAD_MUTEX_LOCK */
155 +/* Define to 1 if you have the `setlocale' function. */
156 +#define HAVE_SETLOCALE 1
158 +/* Define to 1 if you have the `setsockopt' function. */
159 +#if defined (LINUX) || defined (WIN32)
160 +#define HAVE_SETSOCKOPT 1
161 +#endif
163 +/* Define to 1 if you have the `setvbuf' function. */
164 +#define HAVE_SETVBUF 1
166 +/* Define to 1 if you have the `shutdown' function. */
167 +#ifdef LINUX
168 +#define HAVE_SHUTDOWN 1
169 +#endif
171 +/* Define to 1 if you have the `signal' function. */
172 +#define HAVE_SIGNAL 1
174 +/* Define to 1 if you have the <signal.h> header file. */
175 +#define HAVE_SIGNAL_H 1
177 +/* Define to 1 if you have the `snprintf' function. */
178 +#ifdef UNX
179 +#define HAVE_SNPRINTF 1
180 +#endif
182 +#ifdef WIN32
183 +#define snprintf _snprintf
184 +#endif
186 +/* Define to 1 if you have the <socks.h> header file. */
187 +/* #undef HAVE_SOCKS_H */
189 +/* Define to 1 if you have the <stdarg.h> header file. */
190 +#define HAVE_STDARG_H 1
192 +/* Define to 1 if you have the <stdint.h> header file. */
193 +#define HAVE_STDINT_H 1
195 +/* Define to 1 if you have the <stdlib.h> header file. */
196 +#define HAVE_STDLIB_H 1
198 +/* Define to 1 if you have the `stpcpy' function. */
199 +#ifdef LINUX
200 +#define HAVE_STPCPY 1
201 +#endif
203 +/* Define to 1 if you have the `strcasecmp' function. */
204 +#ifdef UNX
205 +#define HAVE_STRCASECMP 1
206 +#endif
208 +#ifdef WIN32
209 +#define strcasecmp strcmpi
210 +#endif
212 +/* Define to 1 if you have the `strerror_r' function. */
213 +#ifdef LINUX
214 +#define HAVE_STRERROR_R 1
215 +#endif
217 +/* Define to 1 if you have the <strings.h> header file. */
218 +#ifdef UNX
219 +#define HAVE_STRINGS_H 1
220 +#endif
222 +/* Define to 1 if you have the <string.h> header file. */
223 +#define HAVE_STRING_H 1
225 +/* Define to 1 if you have the `strtoll' function. */
226 +#define HAVE_STRTOLL 1
228 +/* Define to 1 if you have the `strtoq' function. */
229 +/* #undef HAVE_STRTOQ */
231 +/* Define to 1 if `tm_gmtoff' is member of `struct tm'. */
232 +#ifdef LINUX
233 +#define HAVE_STRUCT_TM_TM_GMTOFF 1
234 +#endif
236 +/* Define to 1 if `__tm_gmtoff' is member of `struct tm'. */
237 +/* #undef HAVE_STRUCT_TM___TM_GMTOFF */
239 +/* Define to 1 if you have the <sys/limits.h> header file. */
240 +/* #undef HAVE_SYS_LIMITS_H */
242 +/* Define to 1 if you have the <sys/poll.h> header file. */
243 +#ifdef UNX
244 +#define HAVE_SYS_POLL_H 1
245 +#endif
247 +/* Define to 1 if you have the <sys/select.h> header file. */
248 +#ifdef UNX
249 +#define HAVE_SYS_SELECT_H 1
250 +#endif
252 +/* Define to 1 if you have the <sys/socket.h> header file. */
253 +#ifdef UNX
254 +#define HAVE_SYS_SOCKET_H 1
255 +#endif
257 +/* Define to 1 if you have the <sys/stat.h> header file. */
258 +#define HAVE_SYS_STAT_H 1
260 +/* Define to 1 if you have the <sys/time.h> header file. */
261 +#ifdef UNX
262 +#define HAVE_SYS_TIME_H 1
263 +#endif
265 +/* Define to 1 if you have the <sys/types.h> header file. */
266 +#define HAVE_SYS_TYPES_H 1
268 +/* Define if the timezone global is available */
269 +#ifndef MACOSX
270 +#define HAVE_TIMEZONE 1
271 +#endif
273 +/* Use trio printf replacement library */
274 +/* #undef HAVE_TRIO */
276 +/* Define to 1 if you have the <trio.h> header file. */
277 +/* #undef HAVE_TRIO_H */
279 +/* Define to 1 if you have the <unistd.h> header file. */
280 +#ifdef UNX
281 +#define HAVE_UNISTD_H 1
282 +#endif
284 +/* Define to 1 if you have the `usleep' function. */
285 +#ifdef UNX
286 +#define HAVE_USLEEP 1
287 +#endif
289 +/* Define to 1 if you have the `vsnprintf' function. */
290 +#if defined( UNX ) || (defined(_MSC_VER) && (_MSC_VER > 1400))
291 +#define HAVE_VSNPRINTF 1
292 +#endif
294 +#ifdef WIN32
295 +#if (defined(_MSC_VER) && (_MSC_VER < 1500)) || defined(__MINGW32__)
296 +#define vsnprintf _vsnprintf
297 +#endif
298 +#endif
300 +/* Define to be location of localedir */
301 +/* #undef LOCALEDIR */
303 +/* Defined when neon is built as a library */
304 +#define NEON_IS_LIBRARY 1
306 +/* Define to be the neon version string */
307 +#define NEON_VERSION "0.26.3"
309 +/* Define to enable debugging */
310 +/* #undef NE_DEBUGGING */
312 +/* Define to be printf format string for off64_t */
313 +#define NE_FMT_OFF64_T "lld"
315 +/* Define to be printf format string for off_t */
316 +#define NE_FMT_OFF_T "ld"
318 +/* Define to be printf format string for size_t */
319 +#define NE_FMT_SIZE_T "u"
321 +/* Define to be printf format string for ssize_t */
322 +#define NE_FMT_SSIZE_T "d"
324 +/* Define to be printf format string for time_t */
325 +#define NE_FMT_TIME_T "ld"
327 +/* Defined if DAV is supported */
328 +#define NE_HAVE_DAV 1
330 +/* Defined if I18N is supported */
331 +/* #undef NE_HAVE_I18N 1 */
333 +/* Defined if IPV6 is supported */
334 +#define NE_HAVE_IPV6 1
336 +/* Defined if LFS is supported */
337 +#define NE_HAVE_LFS 1
339 +/* Defined if SOCKS is supported */
340 +/* #undef NE_HAVE_SOCKS */
342 +/* Defined if SSL is supported */
343 +/* #undef NE_HAVE_SSL */
344 +#define NE_HAVE_SSL
345 +/* Defined if TS_SSL is supported */
346 +/* #undef NE_HAVE_TS_SSL */
348 +/* Defined if ZLIB is supported */
349 +/* #undef NE_HAVE_ZLIB */
351 +/* Define to be filename of an SSL CA root bundle */
352 +/* #undef NE_SSL_CA_BUNDLE */
354 +/* Define if poll() should be used */
355 +#ifdef UNX
356 +#define NE_USE_POLL 1
357 +#endif
359 +/* Define to be neon library major version */
360 +#define NE_VERSION_MAJOR (0)
362 +/* Define to be neon library minor version */
363 +#define NE_VERSION_MINOR (26)
365 +/* Define to be neon library patch version */
366 +#define NE_VERSION_PATCH (3)
368 +/* Define to the address where bug reports for this package should be sent. */
369 +#define PACKAGE_BUGREPORT "neon@webdav.org"
371 +/* Define to the full name of this package. */
372 +#define PACKAGE_NAME "neon"
374 +/* Define to the full name and version of this package. */
375 +#define PACKAGE_STRING "neon 0.26.3"
377 +/* Define to the one symbol short name of this package. */
378 +#define PACKAGE_TARNAME "neon"
380 +/* Define to the version of this package. */
381 +#define PACKAGE_VERSION "0.26.3"
383 +/* The size of a `int', as computed by sizeof. */
384 +#define SIZEOF_INT 4
386 +/* The size of a `long', as computed by sizeof. */
387 +#define SIZEOF_LONG 4
389 +/* The size of a `long long', as computed by sizeof. */
390 +#define SIZEOF_LONG_LONG 8
392 +/* The size of a `off64_t', as computed by sizeof. */
393 +#define SIZEOF_OFF64_T 8
395 +/* The size of a `off_t', as computed by sizeof. */
396 +#define SIZEOF_OFF_T 4
398 +/* The size of a `size_t', as computed by sizeof. */
399 +#define SIZEOF_SIZE_T 4
401 +/* The size of a `ssize_t', as computed by sizeof. */
402 +#define SIZEOF_SSIZE_T 4
404 +/* The size of a `time_t', as computed by sizeof. */
405 +#define SIZEOF_TIME_T 4
407 +/* Define to 1 if you have the ANSI C header files. */
408 +#ifdef SOLARIS
409 +#define STDC_HEADERS 1
410 +#endif
412 +/* Define to 1 if strerror_r returns char *. */
413 +#ifdef LINUX
414 +#define STRERROR_R_CHAR_P 1
415 +#endif
417 +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
418 +#define TIME_WITH_SYS_TIME 1
420 +/* Define if getaddrinfo supports AI_ADDRCONFIG */
421 +/* #undef USE_GAI_ADDRCONFIG */
423 +/* Define if getaddrinfo() should be used */
424 +#define USE_GETADDRINFO 1
426 +/* Define to 1 if your processor stores words with the most significant byte
427 + first (like Motorola and SPARC, unlike Intel and VAX). */
428 +#if defined (SOLARIS) && defined (SPARC)
429 +#define WORDS_BIGENDIAN 1
430 +#endif
432 +/* Always defined to enable GNU extensions */
433 +#define _GNU_SOURCE 1
435 +/* Define to empty if `const' does not conform to ANSI C. */
436 +/* #undef const */
438 +/* Define if in_addr_t is not available */
439 +/* #undef in_addr_t */
441 +/* Define to `__inline__' or `__inline' if that's what the C compiler
442 + calls it, or to nothing if 'inline' is not supported under any name. */
443 +#ifndef __cplusplus
444 +#if defined (SOLARIS) && defined (__SUNPRO_C)
445 +#define inline
446 +#endif
447 +#endif
449 +/* Define to `long' if <sys/types.h> does not define. */
450 +/* #undef off_t */
452 +/* Define to `int' if <sys/types.h> does not define. */
453 +/* #undef pid_t */
455 +/* Define to `unsigned' if <sys/types.h> does not define. */
456 +/* #undef size_t */
459 +/* Enable leak-tracking versions of ne_*alloc when NEON_MEMLEAK is enabled */
460 +#ifdef NEON_MEMLEAK
461 +# include "memleak.h"
462 +#endif
464 +#if defined(HAVE_STPCPY) && defined(HAVE_DECL_STPCPY) && !HAVE_DECL_STPCPY && !defined(stpcpy)
465 +char *stpcpy(char *, const char *);
466 +#endif
468 +#ifdef WIN32
470 +#include <io.h>
472 +#define HAVE_SSPI 1
474 +#define HAVE_MEMCPY 1
476 +#define strncasecmp strnicmp
477 +#define inline __inline
478 +#define WIN32_LEAN_AND_MEAN
479 +#define NOUSER
480 +#define NOGDI
481 +#define NONLS
482 +#define NOCRYPT
483 +#endif
484 --- misc/neon-0.28.2/src/makefile.mk 2008-08-25 14:36:04.640625000 +0200
485 +++ misc/build/neon-0.28.2/src/makefile.mk 2008-08-25 14:32:17.671875000 +0200
486 @@ -1 +1,54 @@
487 -dummy
488 +PRJ=..$/..$/..$/..$/..
490 +PRJNAME=neon
491 +TARGET=neon
492 +LIBTARGET=NO
493 +EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
495 +# --- Settings -----------------------------------------------------
497 +.INCLUDE : settings.mk
499 +# --- Files --------------------------------------------------------
501 +CDEFS+=-DHAVE_CONFIG_H
503 +.IF "$(SYSTEM_LIBXML)" == "YES"
504 +CFLAGS+=-DSYSTEM_LIBXML $(LIBXML_CFLAGS)
505 +.ENDIF
508 +SLOFILES= \
509 + $(SLO)$/ne_207.obj \
510 + $(SLO)$/ne_acl.obj \
511 + $(SLO)$/ne_alloc.obj \
512 + $(SLO)$/ne_auth.obj \
513 + $(SLO)$/ne_basic.obj \
514 + $(SLO)$/ne_compress.obj \
515 + $(SLO)$/ne_dates.obj \
516 + $(SLO)$/ne_i18n.obj \
517 + $(SLO)$/ne_locks.obj \
518 + $(SLO)$/ne_md5.obj \
519 + $(SLO)$/ne_props.obj \
520 + $(SLO)$/ne_redirect.obj \
521 + $(SLO)$/ne_request.obj \
522 + $(SLO)$/ne_session.obj \
523 + $(SLO)$/ne_socket.obj \
524 + $(SLO)$/ne_sspi.obj \
525 + $(SLO)$/ne_string.obj \
526 + $(SLO)$/ne_uri.obj \
527 + $(SLO)$/ne_utils.obj \
528 + $(SLO)$/ne_xml.obj \
529 + $(SLO)$/ne_xmlreq.obj \
530 + $(SLO)$/ne_openssl.obj
532 +# $(SLO)$/ne_gnutls.obj \
533 +# $(SLO)$/ne_stubssl.obj
535 +LIB1TARGET=$(SLB)$/$(TARGET).lib
536 +LIB1ARCHIV=$(LB)$/lib$(TARGET).a
537 +LIB1OBJFILES=$(SLOFILES)
539 +# --- Targets ------------------------------------------------------
541 +.INCLUDE : target.mk
542 --- misc/neon-0.28.2/src/ne_207.c 2006-01-02 12:43:19.000000000 +0100
543 +++ misc/build/neon-0.28.2/src/ne_207.c 2009-01-09 10:12:39.563530700 +0100
544 @@ -177,7 +177,6 @@
545 /* Now we have the href, begin the response */
546 if (p->start_response && HAVE_CDATA(p)) {
547 ne_uri ref, resolved;
549 if (ne_uri_parse(cdata, &ref) == 0) {
550 ne_uri_resolve(&p->base, &ref, &resolved);
552 @@ -367,5 +366,4 @@
553 ne_request_destroy(req);
555 return ret;
559 --- misc/neon-0.28.2/src/ne_auth.c 2008-02-29 17:30:12.000000000 +0100
560 +++ misc/build/neon-0.28.2/src/ne_auth.c 2008-08-25 14:35:18.453125000 +0200
561 @@ -598,9 +598,10 @@
562 int ntlm = ne_strcasecmp(parms->protocol->name, "NTLM") == 0;
563 int status;
564 char *response = NULL;
566 + char password[NE_ABUFSIZ];
568 NE_DEBUG(NE_DBG_HTTPAUTH, "auth: SSPI challenge.\n");
571 if (!sess->sspi_context) {
572 ne_uri uri = {0};
574 @@ -614,8 +615,17 @@
575 return status;
579 + /* Authentification needs more than one http request.
580 + * As long as authentification in progress use the existing credentials.
581 + * Otherwise get new credentials.*/
582 + if (!parms->opaque)
583 + if (get_credentials(sess, errmsg, attempt, parms, password)) {
584 + /* Failed to get credentials */
585 + return -1;
588 - status = ne_sspi_authenticate(sess->sspi_context, parms->opaque, &response);
589 + status = ne_sspi_authenticate(sess->sspi_context, parms->opaque, &response, sess->username, password);
590 if (status) {
591 return status;
593 @@ -1413,6 +1423,7 @@
594 /* note above: allow a 401 in response to a CONNECT request
595 * from a proxy since some buggy proxies send that. */
596 NE_DEBUG(NE_DBG_HTTPAUTH, "auth: Got challenge (code %d).\n", status->code);
598 if (!auth_challenge(sess, areq->attempt++, auth_hdr)) {
599 ret = NE_RETRY;
600 } else {
601 --- misc/neon-0.28.2/src/ne_defs.h 2006-10-24 21:40:09.000000000 +0200
602 +++ misc/build/neon-0.28.2/src/ne_defs.h 2008-08-25 14:32:17.875000000 +0200
603 @@ -41,7 +41,7 @@
604 #endif
606 /* define ssize_t for Win32 */
607 -#if defined(WIN32) && !defined(ssize_t)
608 +#if defined(WIN32) && !defined(ssize_t) && !defined(__MINGW32__)
609 #define ssize_t int
610 #endif
612 --- misc/neon-0.28.2/src/ne_locks.h 2006-01-02 12:43:19.000000000 +0100
613 +++ misc/build/neon-0.28.2/src/ne_locks.h 2008-08-25 14:32:17.937500000 +0200
614 @@ -22,6 +22,10 @@
615 #ifndef NE_LOCKS_H
616 #define NE_LOCKS_H
618 +# if defined __GNUC__
619 +# pragma GCC system_header
620 +# endif
622 #include "ne_request.h" /* for ne_session + ne_request */
623 #include "ne_uri.h" /* for ne_uri */
625 --- misc/neon-0.28.2/src/ne_socket.c 2006-10-30 14:18:51.000000000 +0100
626 +++ misc/build/neon-0.28.2/src/ne_socket.c 2008-07-16 13:32:11.022546400 +0200
627 @@ -60,6 +60,7 @@
628 #include <stddef.h>
629 #ifdef USE_GETADDRINFO
630 #include <ws2tcpip.h>
631 +#include <Wspiapi.h>
632 #endif
633 #endif
635 --- misc/neon-0.28.2/src/ne_sspi.c 2007-08-10 17:26:08.000000000 +0200
636 +++ misc/build/neon-0.28.2/src/ne_sspi.c 2009-01-09 10:31:05.752056400 +0100
637 @@ -202,9 +202,48 @@
638 return -1;
641 + return 0;
645 + * Simplification wrapper arround AcquireCredentialsHandle as most of
646 + * the parameters do not change.
647 + */
648 +static int acquireCredentialsHandleForUsername(CredHandle * credentials, char *package, const char *username, const char *password)
650 + SECURITY_STATUS status;
651 + TimeStamp timestamp;
653 + const char *domain = "";
655 + int rc, rcISC;
656 + SecPkgInfo *secPackInfo;
657 + SEC_WINNT_AUTH_IDENTITY *nameAndPwd = NULL;
658 + int bytesReceived = 0, bytesSent = 0;
660 + nameAndPwd = (SEC_WINNT_AUTH_IDENTITY *) malloc( sizeof(SEC_WINNT_AUTH_IDENTITY) );
661 + memset( nameAndPwd, '\0', sizeof (*nameAndPwd) );
662 + nameAndPwd->Domain = (unsigned char *) _strdup( domain? domain: "" );
663 + nameAndPwd->DomainLength = domain? strlen( domain ): 0;
664 + nameAndPwd->User = (unsigned char *) _strdup( username? username: "" );
665 + nameAndPwd->UserLength = username? strlen( username ): 0;
666 + nameAndPwd->Password = (unsigned char *) _strdup( password? password: "" );
667 + nameAndPwd->PasswordLength = password? strlen( password ): 0;
668 + nameAndPwd->Flags = SEC_WINNT_AUTH_IDENTITY_ANSI;
670 + status = pSFT->AcquireCredentialsHandle( NULL, package, SECPKG_CRED_OUTBOUND,
671 + NULL, nameAndPwd, NULL, NULL, credentials, &timestamp );
673 + if (status != SEC_E_OK) {
674 + NE_DEBUG(NE_DBG_HTTPAUTH,
675 + "sspi: AcquireCredentialsHandle [fail] [%x].\n", status);
676 + return -1;
679 return 0;
684 * Wrapper arround initializeSecurityContext. Supplies several
685 * default parameters as well as logging in case of errors.
686 @@ -483,7 +522,7 @@
687 * Processes received authentication tokens as well as supplies the
688 * response token.
690 -int ne_sspi_authenticate(void *context, const char *base64Token, char **responseToken)
691 +int ne_sspi_authenticate(void *context, const char *base64Token, char **responseToken, const char* username, const char* password)
693 SecBufferDesc outBufferDesc;
694 SecBuffer outBuffer;
695 @@ -552,7 +591,7 @@
697 freeBuffer(&outBufferDesc);
698 sspiContext->authfinished = 0;
699 - NE_DEBUG(NE_DBG_HTTPAUTH,"sspi: failing because starting over from failed try.\n");
700 + NE_DEBUG(NE_DBG_HTTPAUTH,"sspi: fai6 over from failed try.\n");
701 return -1;
703 sspiContext->authfinished = 0;
704 @@ -560,14 +599,26 @@
706 /* Reset any existing context since we are starting over */
707 resetContext(sspiContext);
709 + if (strlen(username) != 0) {
710 + if (acquireCredentialsHandleForUsername
711 + (&sspiContext->credentials, sspiContext->mechanism, username, password) != SEC_E_OK) {
712 + freeBuffer(&outBufferDesc);
713 + NE_DEBUG(NE_DBG_HTTPAUTH,
714 + "sspi: acquireCredentialsHandleForUsername failed.\n");
715 + return -1;
717 + } else {
718 + if (acquireCredentialsHandle
719 + (&sspiContext->credentials, sspiContext->mechanism) != SEC_E_OK) {
720 + freeBuffer(&outBufferDesc);
721 + NE_DEBUG(NE_DBG_HTTPAUTH,
722 + "sspi: acquireCredentialsHandle failed.\n");
723 + return -1;
727 - if (acquireCredentialsHandle
728 - (&sspiContext->credentials, sspiContext->mechanism) != SEC_E_OK) {
729 - freeBuffer(&outBufferDesc);
730 - NE_DEBUG(NE_DBG_HTTPAUTH,
731 - "sspi: acquireCredentialsHandle failed.\n");
732 - return -1;
736 securityStatus =
737 initializeSecurityContext(&sspiContext->credentials, NULL,
738 --- misc/neon-0.28.2/src/ne_sspi.h 2006-02-12 13:05:14.000000000 +0100
739 +++ misc/build/neon-0.28.2/src/ne_sspi.h 2008-08-25 14:32:18.000000000 +0200
740 @@ -41,7 +41,7 @@
741 int ne_sspi_clear_context(void *context);
743 int ne_sspi_authenticate(void *context, const char *base64Token,
744 - char **responseToken);
745 + char **responseToken, const char* username, const char* password);
747 #endif /* HAVE_SSPI */
749 --- misc/neon-0.28.2/src/ne_uri.c 2007-12-05 12:04:47.000000000 +0100
750 +++ misc/build/neon-0.28.2/src/ne_uri.c 2009-01-09 10:21:45.201720200 +0100
751 @@ -42,7 +42,7 @@
752 #include "ne_alloc.h"
753 #include "ne_uri.h"
755 -/* URI ABNF from RFC 3986: */
756 +/* URI ABNF from RFC 3986: (TKR: SharePoint is contradictory to this RFC. So I fix it here. )*/
758 #define PS (0x0001) /* "+" */
759 #define PC (0x0002) /* "%" */
760 @@ -67,6 +67,9 @@
762 #define OT (0x4000) /* others */
764 +/* TKR new symbol */
765 +#define WS (0x8000) /* Whitespaces ( Space, Tab ) */
767 #define URI_ALPHA (AL)
768 #define URI_DIGIT (DG)
770 @@ -83,20 +86,21 @@
771 /* pchar = unreserved / pct-encoded / sub-delims / ":" / "@" */
772 #define URI_PCHAR (URI_UNRESERVED | PC | URI_SUBDELIM | CL | AT)
773 /* invented: segchar = pchar / "/" */
774 -#define URI_SEGCHAR (URI_PCHAR | FS)
775 +/* (TKR) WS added */
776 +#define URI_SEGCHAR (URI_PCHAR | FS | WS)
777 /* query = *( pchar / "/" / "?" ) */
778 #define URI_QUERY (URI_PCHAR | FS | QU)
779 /* fragment == query */
780 #define URI_FRAGMENT URI_QUERY
782 /* any characters which should be path-escaped: */
783 -#define URI_ESCAPE ((URI_GENDELIM & ~(FS)) | URI_SUBDELIM | OT | PC)
784 +#define URI_ESCAPE ((URI_GENDELIM & ~(FS)) | URI_SUBDELIM | OT | WS | PC)
786 static const unsigned int uri_chars[256] = {
787 /* 0xXX x0 x2 x4 x6 x8 xA xC xE */
788 -/* 0x */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT,
789 +/* 0x */ OT, OT, OT, OT, OT, OT, OT, OT, OT, WS, OT, OT, OT, OT, OT, OT,
790 /* 1x */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT,
791 -/* 2x */ OT, SD, OT, GD, SD, PC, SD, SD, SD, SD, SD, PS, SD, DS, DT, FS,
792 +/* 2x */ WS, SD, OT, GD, SD, PC, SD, SD, SD, SD, SD, PS, SD, DS, DT, FS,
793 /* 3x */ DG, DG, DG, DG, DG, DG, DG, DG, DG, DG, CL, SD, OT, SD, OT, QU,
794 /* 4x */ AT, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL,
795 /* 5x */ AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, GD, OT, GD, OT, US,