From 5d98836cfb94176c7a50d0836ad8f0c153364063 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Fri, 18 Oct 2013 23:02:24 +0200 Subject: fdo#70393: move neon to a subdir of external Change-Id: I504b69437ca2849a9bf825c67e52a671ec1e1ad8 Reviewed-on: https://gerrit.libreoffice.org/6348 Reviewed-by: David Tardon Tested-by: David Tardon --- RepositoryModule_host.mk | 1 - external/Module_external.mk | 1 + external/neon/Library_neon.mk | 106 +++++ external/neon/Makefile | 7 + external/neon/Module_neon.mk | 17 + external/neon/README | 1 + external/neon/UnpackedTarball_neon.mk | 26 ++ external/neon/configs/config.h | 600 +++++++++++++++++++++++++++ external/neon/neon.def | 292 +++++++++++++ external/neon/neon.patch | 423 +++++++++++++++++++ external/neon/neon_ne_set_request_flag.patch | 11 + external/neon/neon_with_gnutls.patch | 29 ++ neon/Library_neon.mk | 106 ----- neon/Makefile | 7 - neon/Module_neon.mk | 21 - neon/README | 1 - neon/UnpackedTarball_neon.mk | 26 -- neon/configs/config.h | 600 --------------------------- neon/neon.def | 292 ------------- neon/neon.patch | 423 ------------------- neon/neon_ne_set_request_flag.patch | 11 - neon/neon_with_gnutls.patch | 29 -- 22 files changed, 1513 insertions(+), 1517 deletions(-) create mode 100644 external/neon/Library_neon.mk create mode 100644 external/neon/Makefile create mode 100644 external/neon/Module_neon.mk create mode 100644 external/neon/README create mode 100644 external/neon/UnpackedTarball_neon.mk create mode 100644 external/neon/configs/config.h create mode 100644 external/neon/neon.def create mode 100644 external/neon/neon.patch create mode 100644 external/neon/neon_ne_set_request_flag.patch create mode 100644 external/neon/neon_with_gnutls.patch delete mode 100644 neon/Library_neon.mk delete mode 100644 neon/Makefile delete mode 100644 neon/Module_neon.mk delete mode 100644 neon/README delete mode 100644 neon/UnpackedTarball_neon.mk delete mode 100644 neon/configs/config.h delete mode 100644 neon/neon.def delete mode 100644 neon/neon.patch delete mode 100644 neon/neon_ne_set_request_flag.patch delete mode 100644 neon/neon_with_gnutls.patch diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk index dba46e69bc1e..99b24e1342dd 100644 --- a/RepositoryModule_host.mk +++ b/RepositoryModule_host.mk @@ -80,7 +80,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\ $(call gb_Helper_optional,MORE_FONTS,more_fonts) \ $(call gb_Helper_optional,MOZ,moz) \ $(call gb_Helper_optional,MARIADBC,mysqlc) \ - $(call gb_Helper_optional,NEON,neon) \ $(call gb_Helper_optional,NLPSOLVER,nlpsolver) \ np_sdk \ $(call gb_Helper_optional,NSS,nss) \ diff --git a/external/Module_external.mk b/external/Module_external.mk index c0b95e0f29ab..988d477897d3 100644 --- a/external/Module_external.mk +++ b/external/Module_external.mk @@ -54,6 +54,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\ $(call gb_Helper_optional,MWAW,libmwaw) \ $(call gb_Helper_optional,MYSQLCPPCONN,mysqlcppconn) \ $(call gb_Helper_optional,MYTHES,mythes) \ + $(call gb_Helper_optional,NEON,neon) \ $(call gb_Helper_optional,ODFGEN,libodfgen) \ $(call gb_Helper_optional,ORCUS,liborcus) \ $(call gb_Helper_optional,VISIO,libvisio) \ diff --git a/external/neon/Library_neon.mk b/external/neon/Library_neon.mk new file mode 100644 index 000000000000..d391a3ea3472 --- /dev/null +++ b/external/neon/Library_neon.mk @@ -0,0 +1,106 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Library_Library,neon)) + +$(eval $(call gb_Library_use_unpacked,neon,neon)) + +$(eval $(call gb_Library_use_externals,neon,\ + gnutls \ + libxml2 \ + libgcrypt \ + openssl \ + openssl_headers \ + zlib \ +)) + +$(eval $(call gb_Library_set_visibility_default,neon)) + +# neon has its share of warning... let's spare use +# the pointless spamming +$(eval $(call gb_Library_add_cflags,neon,\ + -w \ +)) + +ifneq ($(debug),) +$(eval $(call gb_Library_add_cflags,neon,\ + -DNE_DEBUGGING \ +)) +endif + +$(eval $(call gb_Library_set_warnings_not_errors,neon)) + +$(eval $(call gb_Library_add_generated_cobjects,neon,\ + UnpackedTarball/neon/src/ne_207 \ + UnpackedTarball/neon/src/ne_acl3744 \ + UnpackedTarball/neon/src/ne_alloc \ + UnpackedTarball/neon/src/ne_auth \ + UnpackedTarball/neon/src/ne_basic \ + UnpackedTarball/neon/src/ne_compress \ + UnpackedTarball/neon/src/ne_dates \ + UnpackedTarball/neon/src/ne_i18n \ + UnpackedTarball/neon/src/ne_locks \ + UnpackedTarball/neon/src/ne_md5 \ + UnpackedTarball/neon/src/ne_props \ + UnpackedTarball/neon/src/ne_redirect \ + UnpackedTarball/neon/src/ne_request \ + UnpackedTarball/neon/src/ne_session \ + UnpackedTarball/neon/src/ne_socket \ + UnpackedTarball/neon/src/ne_socks \ + UnpackedTarball/neon/src/ne_string \ + UnpackedTarball/neon/src/ne_uri \ + UnpackedTarball/neon/src/ne_utils \ + UnpackedTarball/neon/src/ne_xml \ + UnpackedTarball/neon/src/ne_xmlreq \ +)) + + +ifneq ($(DISABLE_OPENSSL),TRUE) +$(eval $(call gb_Library_add_generated_cobjects,neon,\ + UnpackedTarball/neon/src/ne_openssl \ +)) +else +$(eval $(call gb_Library_add_generated_cobjects,neon,\ + UnpackedTarball/neon/src/ne_gnutls \ +)) +endif + + +ifeq ($(OS),WNT) +$(eval $(call gb_Library_use_system_win32_libs,neon,\ + ws2_32 \ + crypt32 \ +)) + +ifeq ($(COM),MSC) +$(eval $(call gb_Library_add_ldflags,neon,\ + /DEF:$(SRCDIR)/neon/neon.def \ +)) +endif + +$(eval $(call gb_Library_add_generated_cobjects,neon,\ + UnpackedTarball/neon/src/ne_sspi \ +)) + +else +ifneq ($(DISABLE_OPENSSL),TRUE) +$(eval $(call gb_Library_add_generated_cobjects,neon,\ + UnpackedTarball/neon/src/ne_ntlm \ +)) +endif + +endif + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_libs,neon,\ + -ldl \ +)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/neon/Makefile b/external/neon/Makefile new file mode 100644 index 000000000000..e4968cf85fb6 --- /dev/null +++ b/external/neon/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/external/neon/Module_neon.mk b/external/neon/Module_neon.mk new file mode 100644 index 000000000000..cc2e0cb5e2a6 --- /dev/null +++ b/external/neon/Module_neon.mk @@ -0,0 +1,17 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Module_Module,neon)) + +$(eval $(call gb_Module_add_targets,neon,\ + Library_neon \ + UnpackedTarball_neon \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/neon/README b/external/neon/README new file mode 100644 index 000000000000..9a40fd74890b --- /dev/null +++ b/external/neon/README @@ -0,0 +1 @@ +Web library to help deal with WebDAV or other protocols, from [http://www.webdav.org/neon/]. diff --git a/external/neon/UnpackedTarball_neon.mk b/external/neon/UnpackedTarball_neon.mk new file mode 100644 index 000000000000..1b922df83d49 --- /dev/null +++ b/external/neon/UnpackedTarball_neon.mk @@ -0,0 +1,26 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,neon)) + +$(eval $(call gb_UnpackedTarball_set_tarball,neon,$(NEON_TARBALL))) + +$(eval $(call gb_UnpackedTarball_add_files,neon,src,\ + external/neon/configs/config.h \ +)) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,neon,0)) + +$(eval $(call gb_UnpackedTarball_add_patches,neon,\ + external/neon/neon.patch \ + external/neon/neon_ne_set_request_flag.patch \ + external/neon/neon_with_gnutls.patch \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/neon/configs/config.h b/external/neon/configs/config.h new file mode 100644 index 000000000000..b0fdf22559e3 --- /dev/null +++ b/external/neon/configs/config.h @@ -0,0 +1,600 @@ +/* Contents kept in sync with config.h.in from neon 0.29.5 */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to specific EGD socket path */ +/* #undef EGD_PATH */ + +/* Define if EGD should be supported */ +/* #undef ENABLE_EGD */ + +/* Define if GSS_C_NT_HOSTBASED_SERVICE is not defined otherwise */ +/* #undef GSS_C_NT_HOSTBASED_SERVICE */ + +/* Define to 1 if you have the header file. */ +#ifdef UNX +#define HAVE_ARPA_INET_H 1 +#endif + +/* Define to 1 if you have the `bind_textdomain_codeset' function. */ +/* #undef HAVE_BIND_TEXTDOMAIN_CODESET */ + +/* Define to 1 if you have the `CRYPTO_set_idptr_callback' function. */ +/* #undef HAVE_CRYPTO_SET_IDPTR_CALLBACK */ + +/* Define to 1 if you have the declaration of `h_errno', and to 0 if you + don't. */ +#ifdef WIN32 +#define HAVE_DECL_H_ERRNO 1 +#endif + +/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't. + */ +#ifdef LINUX +#define HAVE_DECL_STPCPY 1 +#endif + +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ +#ifdef LINUX +#define HAVE_DECL_STRERROR_R 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifdef UNX +#define HAVE_DLFCN_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H 1 + +/* Define if you have expat */ +/* #undef HAVE_EXPAT */ + +/* Define to 1 if you have the `fcntl' function. */ +#ifdef UNX +#define HAVE_FCNTL 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifdef UNX +#define HAVE_FCNTL_H 1 +#endif + +/* Define to 1 if you have the `fstat64' function. */ +#define HAVE_FSTAT64 + +/* Define to 1 if you have the `gai_strerror' function. */ +#define HAVE_GAI_STRERROR 1 + +/* Define to 1 if you have the `gethostname' function. */ +/* #undef HAVE_GETHOSTNAME */ + +/* Define to 1 if you have the `getnameinfo' function. */ +/* #undef HAVE_GETNAMEINFO */ + +/* Define to 1 if you have the `getsockopt' function. */ +#ifdef UNX +#define HAVE_GETSOCKOPT 1 +#endif + +#ifdef DISABLE_OPENSSL +/* Define if GnuTLS support is enabled */ +#define HAVE_GNUTLS + +/* Define to 1 if you have the `gnutls_certificate_get_x509_cas' function. */ +/* #undef HAVE_GNUTLS_CERTIFICATE_GET_X509_CAS */ + +/* Define to 1 if you have the `gnutls_certificate_verify_peers2' function. */ +#define HAVE_GNUTLS_CERTIFICATE_VERIFY_PEERS2 + +/* Define to 1 if you have the `gnutls_session_get_data2' function. */ +#define HAVE_GNUTLS_SESSION_GET_DATA2 + +/* Define to 1 if you have the `gnutls_sign_callback_set' function. */ +#define HAVE_GNUTLS_SIGN_CALLBACK_SET + +/* Define to 1 if you have the `gnutls_x509_dn_get_rdn_ava' function. */ +#define HAVE_GNUTLS_X509_DN_GET_RDN_AVA +#endif /* DISABLE_OPENSSL */ + +/* Define if GSSAPI support is enabled */ +/* #undef HAVE_GSSAPI */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_GSSAPI_GSSAPI_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_GSSAPI_H */ + +/* Define to 1 if you have the `gss_init_sec_context' function. */ +/* #undef HAVE_GSS_INIT_SEC_CONTEXT */ + +/* Define to 1 if you have the `hstrerror' function. */ +/* #undef HAVE_HSTRERROR */ + +/* Define to 1 if you have the `iconv' function. */ +/* #undef HAVE_ICONV */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ICONV_H */ + +/* Define to 1 if you have the `inet_ntop' function. */ +#ifdef UNX +#define HAVE_INET_NTOP 1 +#endif + +/* Define to 1 if you have the `inet_pton' function. */ +/* #undef HAVE_INET_PTON */ + +/* Define to 1 if you have the header file. */ +#ifdef UNX +#define HAVE_INTTYPES_H 1 +#endif + +/* Define to 1 if you have the `isatty' function. */ +#define HAVE_ISATTY 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LIBINTL_H */ + +/* Define if libproxy is supported */ +/* #undef HAVE_LIBPROXY */ + +/* Define if you have libxml */ +#define HAVE_LIBXML 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIBXML_PARSER_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIBXML_XMLVERSION_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if you have the `lseek64' function. */ +#define HAVE_LSEEK64 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +#ifdef UNX +#define HAVE_NETDB_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifdef UNX +#define HAVE_NETINET_IN_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifdef UNX +#define HAVE_NETINET_TCP_H 1 +#endif + +#ifndef DISABLE_OPENSSL +/* Define if NTLM is supported */ +#ifndef WIN32 +#define HAVE_NTLM 1 +#endif + +/* Define if OpenSSL support is enabled */ +#define HAVE_OPENSSL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_OPENSSLV_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_SSL_H 1 +#endif /* !DISABLE_OPENSSL */ + +/* Define if pakchois library supported */ +/* #undef HAVE_PAKCHOIS */ + +/* Define to 1 if you have the `pipe' function. */ +#define HAVE_PIPE 1 + +/* Define to 1 if you have the `poll' function. */ +#define HAVE_POLL 1 + +/* Define to 1 if you have the `pthread_mutex_init' function. */ +/* #undef HAVE_PTHREAD_MUTEX_INIT */ + +/* Define to 1 if you have the `pthread_mutex_lock' function. */ +/* #undef HAVE_PTHREAD_MUTEX_LOCK */ + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the `setsockopt' function. */ +#if defined (LINUX) || defined (WIN32) +#define HAVE_SETSOCKOPT 1 +#endif + +/* Define to 1 if you have the `setvbuf' function. */ +#define HAVE_SETVBUF 1 + +/* Define to 1 if you have the `shutdown' function. */ +#ifdef LINUX +#define HAVE_SHUTDOWN 1 +#endif + +/* Define to 1 if you have the `signal' function. */ +#define HAVE_SIGNAL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SIGNAL_H 1 + +/* Define to 1 if you have the `snprintf' function. */ +#ifdef UNX +#define HAVE_SNPRINTF 1 +#endif + +#ifdef WIN32 +#define snprintf _snprintf +#endif + +/* Define to 1 if the system has the type `socklen_t'. */ +#ifdef UNX +#define HAVE_SOCKLEN_T 1 +#endif + +/* Define to 1 if you have the `SSL_SESSION_cmp' function. */ +/* #undef HAVE_SSL_SESSION_CMP */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDARG_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `stpcpy' function. */ +#ifdef LINUX +#define HAVE_STPCPY 1 +#endif + +/* Define to 1 if you have the `strcasecmp' function. */ +#ifdef UNX +#define HAVE_STRCASECMP 1 +#endif + +#ifdef WIN32 +#define strcasecmp strcmpi +#endif + +/* Define to 1 if you have the `strerror_r' function. */ +#ifdef LINUX +#define HAVE_STRERROR_R 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifdef UNX +#define HAVE_STRINGS_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + +/* Define to 1 if you have the `strtoq' function. */ +/* #undef HAVE_STRTOQ */ + +/* Define to 1 if `tm_gmtoff' is member of `struct tm'. */ +#ifdef LINUX +#define HAVE_STRUCT_TM_TM_GMTOFF 1 +#endif + +/* Define to 1 if `__tm_gmtoff' is member of `struct tm'. */ +/* #undef HAVE_STRUCT_TM___TM_GMTOFF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_LIMITS_H */ + +/* Define to 1 if you have the header file. */ +#ifdef UNX +#define HAVE_SYS_POLL_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifdef UNX +#define HAVE_SYS_SELECT_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifdef UNX +#define HAVE_SYS_SOCKET_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#ifdef UNX +#define HAVE_SYS_TIME_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define if the timezone global is available */ +#ifndef MACOSX +#define HAVE_TIMEZONE 1 +#endif + +/* Use trio printf replacement library */ +/* #undef HAVE_TRIO */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_TRIO_H */ + +/* Define to 1 if you have the header file. */ +#ifdef UNX +#define HAVE_UNISTD_H 1 +#endif + +/* Define to 1 if you have the `usleep' function. */ +#ifdef UNX +#define HAVE_USLEEP 1 +#endif + +/* Define to 1 if you have the `vsnprintf' function. */ +#if defined( UNX ) || defined(_MSC_VER) +#define HAVE_VSNPRINTF 1 +#endif + +#ifdef __MINGW32__ +#define vsnprintf _vsnprintf +#endif + +/* Define to be location of localedir */ +/* #undef LOCALEDIR */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +/* #undef LT_OBJDIR */ + +/* Defined when neon is built as a library */ +#define NEON_IS_LIBRARY 1 + +/* Define to be the neon version string */ +#define NEON_VERSION "0.29.5" + +/* Define to enable debugging */ +/* #undef NE_DEBUGGING */ + +/* Define to be printf format string for ne_off_t */ +/* #undef NE_FMT_NE_OFF_T */ + +/* Define to be printf format string for off64_t */ +#define NE_FMT_OFF64_T "lld" + +/* Define to be printf format string for off_t */ +#define NE_FMT_OFF_T "ld" + +/* Define to be printf format string for size_t */ +#define NE_FMT_SIZE_T "u" + +/* Define to be printf format string for ssize_t */ +#define NE_FMT_SSIZE_T "d" + +/* Define to be printf format string for time_t */ +#define NE_FMT_TIME_T "ld" + +/* Define to be printf format string for XML_Size */ +/* #undef NE_FMT_XML_SIZE */ + +/* Defined if DAV is supported */ +#define NE_HAVE_DAV 1 + +/* Defined if I18N is supported */ +/* #undef NE_HAVE_I18N */ + +/* Defined if IPV6 is supported */ +#define NE_HAVE_IPV6 1 + +/* Defined if LFS is supported */ +#define NE_HAVE_LFS 1 + +/* Defined if LIBPXY is supported */ +/* #undef NE_HAVE_LIBPXY */ + +/* Defined if SSL is supported */ +#define NE_HAVE_SSL + +/* Defined if TS_SSL is supported */ +/* #undef NE_HAVE_TS_SSL */ + +/* Defined if ZLIB is supported */ +#define NE_HAVE_ZLIB 1 + +/* Define to be filename of an SSL CA root bundle */ +/* #undef NE_SSL_CA_BUNDLE */ + +/* Define if poll() should be used */ +#ifdef UNX +#define NE_USE_POLL 1 +#endif + +/* Define to be neon library major version */ +#define NE_VERSION_MAJOR (0) + +/* Define to be neon library minor version */ +#define NE_VERSION_MINOR (29) + +/* Define to be neon library patch version */ +#define NE_VERSION_PATCH (5) + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "neon@webdav.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "neon" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "neon 0.29.5" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "neon" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "0.29.5" + +/* The size of `int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `off64_t', as computed by sizeof. */ +#define SIZEOF_OFF64_T 8 + +/* The size of `off_t', as computed by sizeof. */ +#define SIZEOF_OFF_T 4 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + +/* The size of `ssize_t', as computed by sizeof. */ +#define SIZEOF_SSIZE_T 4 + +/* The size of `time_t', as computed by sizeof. */ +#define SIZEOF_TIME_T 4 + +/* The size of `XML_Size', as computed by sizeof. */ +/* #undef SIZEOF_XML_SIZE */ + +/* Define to 1 if you have the ANSI C header files. */ +#ifdef SOLARIS +#define STDC_HEADERS 1 +#endif + +/* Define to 1 if strerror_r returns char *. */ +#ifdef LINUX +#define STRERROR_R_CHAR_P 1 +#endif + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Define if getaddrinfo supports AI_ADDRCONFIG */ +/* #undef USE_GAI_ADDRCONFIG */ + +/* Define if getaddrinfo() should be used */ +#define USE_GETADDRINFO 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined (SOLARIS) && defined (SPARC) +#define WORDS_BIGENDIAN 1 +#endif + +/* Always defined to enable GNU extensions */ +#define _GNU_SOURCE 1 + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define if in_addr_t is not available */ +/* #undef in_addr_t */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#if defined (SOLARIS) && defined (__SUNPRO_C) +#define inline +#endif +#endif + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define if socklen_t is not available */ +/* #undef socklen_t */ + +/* MS IIS does not send Lock-Token response header after creation of a */ +/* new lock. This violates RFC, but... if we want to talk with this */ +/* beast we need a workaround */ +#define IIS_LOCK_BUG_WORKAROUND 1 + + +/* Enable leak-tracking versions of ne_*alloc when NEON_MEMLEAK is enabled */ +#ifdef NEON_MEMLEAK +# include "memleak.h" +#endif + +#if defined(HAVE_STPCPY) && defined(HAVE_DECL_STPCPY) && !HAVE_DECL_STPCPY && !defined(stpcpy) +char *stpcpy(char *, const char *); +#endif + +#ifdef WIN32 + +#include + +#define HAVE_MEMCPY 1 + +#define strncasecmp strnicmp +#define inline __inline +#define WIN32_LEAN_AND_MEAN +#define NOUSER +#define NOGDI +#define NONLS +#define NOCRYPT + +#define HAVE_SSPI 1 + +#endif diff --git a/external/neon/neon.def b/external/neon/neon.def new file mode 100644 index 000000000000..3a14d66fbdfe --- /dev/null +++ b/external/neon/neon.def @@ -0,0 +1,292 @@ +LIBRARY "neon.dll" +HEAPSIZE 0 +EXPORTS + ne_sspi_authenticate; + ne_sspi_clear_context; + ne_sspi_create_context; + ne_sspi_deinit; + ne_sspi_destroy_context; + ne_sspi_init; + ne__negotiate_ssl; + ne__ssl_exit; + ne__ssl_init; + ne_ssl_cert_cmp; + ne_ssl_cert_digest; + ne_ssl_cert_export; + ne_ssl_cert_free; + ne_ssl_cert_identity; + ne_ssl_cert_import; + ne_ssl_cert_issuer; + ne_ssl_cert_read; + ne_ssl_cert_signedby; + ne_ssl_cert_subject; + ne_ssl_cert_validity_time; + ne_ssl_cert_write; + ne_ssl_clicert_decrypt; + ne_ssl_clicert_encrypted; + ne_ssl_clicert_free; + ne_ssl_clicert_name; + ne_ssl_clicert_owner; + ne_ssl_clicert_read; + ne_ssl_context_create; + ne_ssl_context_destroy; + ne_ssl_context_keypair; + ne_ssl_context_set_flag; + ne_ssl_context_set_verify; + ne_ssl_context_trustcert; + ne_ssl_dname_cmp; + ne_ssl_readable_dname; + ne_ssl_set_clicert; + ne_ssl_trust_default_ca; + ne_xml_dispatch_request; + ne_xml_parse_response; + ne_xml_create; + ne_xml_currentline; + ne_xml_destroy; + ne_xml_doc_encoding; + ne_xml_failed; + ne_xml_get_attr; + ne_xml_get_error; + ne_xml_mapid; + ne_xml_parse; + ne_xml_parse_v; + ne_xml_push_handler; + ne_xml_resolve_nspace; + ne_xml_set_error; + ne_debug; + ne_debug_init; + ne_debug_mask; + ne_debug_stream; + ne_has_support; + ne_parse_statusline; + ne_version_match; + ne_version_string; + ne_path_childof; + ne_path_compare; + ne_path_escape; + ne_path_has_trailing_slash; + ne_path_parent; + ne_path_unescape; + ne_uri_cmp; + ne_uri_copy; + ne_uri_defaultport; + ne_uri_free; + ne_uri_parse; + ne_uri_resolve; + ne_uri_unparse; + ne_base64; + ne_buffer_altered; + ne_buffer_append; + ne_buffer_clear; + ne_buffer_concat; + ne_buffer_create; + ne_buffer_destroy; + ne_buffer_finish; + ne_buffer_grow; + ne_buffer_ncreate; + ne_buffer_snprintf; + ne_buffer_zappend; + ne_concat; + ne_qtoken; + ne_shave; + ne_snprintf; + ne_strcasecmp; + ne_strclean; + ne_strerror; + ne_strncasecmp; + ne_token; + ne_tolower_array; + ne_unbase64; + ne_vsnprintf; + ne__sock_sslsock; + ne_addr_destroy; + ne_addr_error; + ne_addr_first; + ne_addr_next; + ne_addr_resolve; + ne_addr_result; + ne_iaddr_cmp; + ne_iaddr_free; + ne_iaddr_make; + ne_iaddr_print; + ne_iaddr_reverse; + ne_iaddr_typeof; + ne_sock_accept; + ne_sock_accept_ssl; + ne_sock_block; + ne_sock_cipher; + ne_sock_close; + ne_sock_connect; + ne_sock_connect_ssl; + ne_sock_connect_timeout; + ne_sock_create; + ne_sock_error; + ne_sock_exit; + ne_sock_fd; + ne_sock_fullread; + ne_sock_fullwrite; + ne_sock_init; + ne_sock_peek; + ne_sock_peer; + ne_sock_prebind; + ne_sock_proxy; + ne_sock_read; + ne_sock_read_timeout; + ne_sock_readline; + ne_sock_sessid; + ne__ssl_set_verify_err; + ne_close_connection; + ne_fill_proxy_uri; + ne_fill_server_uri; + ne_get_error; + ne_get_scheme; + ne_get_server_hostport; + ne_get_session_flag; + ne_hook_close_conn; + ne_hook_create_request; + ne_hook_destroy_request; + ne_hook_destroy_session; + ne_hook_post_headers; + ne_hook_post_send; + ne_hook_pre_send; + ne_session_create; + ne_session_destroy; + ne_session_proxy; + ne_set_addrlist; + ne_set_connect_timeout; + ne_set_error; + ne_set_localaddr; + ne_set_notifier; + ne_set_progress; + ne_set_read_timeout; + ne_set_session_flag; + ne_set_session_private; + ne_set_useragent; + ne_ssl_cert_validity; + ne_ssl_provide_clicert; + ne_ssl_set_verify; + ne_ssl_trust_cert; + ne_unhook_close_conn; + ne_unhook_create_request; + ne_unhook_destroy_request; + ne_unhook_destroy_session; + ne_unhook_post_headers; + ne_unhook_post_send; + ne_unhook_pre_send; + ne_version_pre_http11; + ne_accept_2xx; + ne_accept_always; + ne_add_request_header; + ne_add_response_body_reader; + ne_begin_request; + ne_discard_response; + ne_end_request; + ne_get_request_flag; + ne_get_request_private; + ne_get_response_header; + ne_get_session; + ne_get_session_private; + ne_get_status; + ne_print_request_header; + ne_read_response_block; + ne_read_response_to_fd; + ne_request_create; + ne_request_destroy; + ne_request_dispatch; + ne_response_header_iterate; + ne_set_request_body_buffer; + ne_set_request_body_fd; + ne_set_request_body_provider; + ne_set_request_flag; + ne_set_request_private; + ne_redirect_location; + ne_redirect_register; + ne_propfind_allprop; + ne_propfind_create; + ne_propfind_current_private; + ne_propfind_destroy; + ne_propfind_get_parser; + ne_propfind_get_request; + ne_propfind_named; + ne_propfind_set_private; + ne_propnames; + ne_proppatch; + ne_propset_iterate; + ne_propset_lang; + ne_propset_private; + ne_propset_status; + ne_propset_value; + ne_simple_propfind; + ne_ascii_to_md5; + ne_md5_create_ctx; + ne_md5_destroy_ctx; + ne_md5_dup_ctx; + ne_md5_finish_ascii; + ne_md5_finish_ctx; + ne_md5_process_block; + ne_md5_process_bytes; + ne_md5_read_ctx; + ne_md5_reset_ctx; + ne_md5_stream; + ne_md5_to_ascii; + ne_lock; + ne_lock_copy; + ne_lock_create; + ne_lock_destroy; + ne_lock_discover; + ne_lock_free; + ne_lock_refresh; + ne_lock_using_parent; + ne_lock_using_resource; + ne_lockstore_add; + ne_lockstore_create; + ne_lockstore_destroy; + ne_lockstore_findbyuri; + ne_lockstore_first; + ne_lockstore_next; + ne_lockstore_register; + ne_lockstore_remove; + ne_unlock; + ne_i18n_init; + ne_asctime_parse; + ne_httpdate_parse; + ne_iso8601_parse; + ne_rfc1036_parse; + ne_rfc1123_date; + ne_rfc1123_parse; + ne_decompress_destroy; + ne_decompress_reader; + ne_add_depth_header; + ne_copy; + ne_delete; + ne_get; + ne_get_content_type; + ne_get_range; + ne_getmodtime; + ne_mkcol; + ne_move; + ne_options; + ne_options2; + ne_post; + ne_put; + ne_add_proxy_auth; + ne_add_server_auth; + ne_forget_auth; + ne_set_proxy_auth; + ne_set_server_auth; + ne_calloc; + ne_malloc; + ne_oom_callback; + ne_realloc; + ne_strdup; + ne_strndup; + ne_free; + ne_acl3744_set; + ne_207_create; + ne_207_destroy; + ne_207_get_current_propstat; + ne_207_get_current_response; + ne_207_set_propstat_handlers; + ne_207_set_response_handlers; + ne_accept_207; + ne_simple_request; diff --git a/external/neon/neon.patch b/external/neon/neon.patch new file mode 100644 index 000000000000..95d6b55024b3 --- /dev/null +++ b/external/neon/neon.patch @@ -0,0 +1,423 @@ +--- src/ne_auth.c 2010-10-14 17:00:53.000000000 +0200 ++++ src/ne_auth.c 2011-02-03 10:31:22.000000000 +0100 +@@ -367,7 +367,7 @@ + static int get_credentials(auth_session *sess, ne_buffer **errmsg, int attempt, + struct auth_challenge *chall, char *pwbuf) + { +- if (chall->handler->creds(chall->handler->userdata, sess->realm, ++ if (chall->handler->creds(chall->handler->userdata, chall->protocol->name, sess->realm, + chall->handler->attempt++, sess->username, pwbuf) == 0) { + return 0; + } else { +@@ -385,15 +385,19 @@ + { + char *tmp, password[NE_ABUFSIZ]; + ++#if 0 /* Workaround - IIS sends challenge without realm. */ ++ + /* Verify challenge... must have a realm */ + if (parms->realm == NULL) { + challenge_error(errmsg, _("missing realm in Basic challenge")); + return -1; + } ++#endif + + clean_session(sess); + +- sess->realm = ne_strdup(parms->realm); ++ if (parms->realm != NULL) ++ sess->realm = ne_strdup(parms->realm); + + if (get_credentials(sess, errmsg, attempt, parms, password)) { + /* Failed to get credentials */ +@@ -610,10 +614,12 @@ + return NULL; + } + +-static int continue_sspi(auth_session *sess, int ntlm, const char *hdr) ++static int continue_sspi(auth_session *sess, int ntlm, const char *hdr, ++ int attempt, struct auth_challenge *parms, ne_buffer **errmsg) + { + int status; + char *response = NULL; ++ char password[NE_ABUFSIZ]; + + NE_DEBUG(NE_DBG_HTTPAUTH, "auth: SSPI challenge.\n"); + +@@ -630,8 +636,17 @@ + return status; + } + } +- +- status = ne_sspi_authenticate(sess->sspi_context, hdr, &response); ++ ++ /* Authentification needs more than one http request. ++ * As long as authentification in progress use the existing credentials. ++ * Otherwise get new credentials.*/ ++ if (!hdr) ++ if (get_credentials(sess, errmsg, attempt, parms, password)) { ++ /* Failed to get credentials */ ++ return -1; ++ } ++ ++ status = ne_sspi_authenticate(sess->sspi_context, hdr, &response, sess->username, password); + if (status) { + return status; + } +@@ -651,7 +666,7 @@ + { + int ntlm = ne_strcasecmp(parms->protocol->name, "NTLM") == 0; + +- return continue_sspi(sess, ntlm, parms->opaque); ++ return continue_sspi(sess, ntlm, parms->opaque, attempt, parms, errmsg); + } + + static int verify_sspi(struct auth_request *req, auth_session *sess, +@@ -674,7 +689,7 @@ + return NE_OK; + } + +- return continue_sspi(sess, ntlm, ptr); ++ return continue_sspi(sess, ntlm, ptr, 0, NULL, NULL); + } + + #endif +--- src/ne_auth.h 2009-09-01 22:13:12.000000000 +0200 ++++ src/ne_auth.h 2011-02-03 10:26:20.000000000 +0100 +@@ -47,8 +47,8 @@ + * Hint: if you just wish to attempt authentication just once (even if + * the user gets the username/password wrong), have the callback + * function use 'attempt' value as the function return value. */ +-typedef int (*ne_auth_creds)(void *userdata, const char *realm, int attempt, +- char *username, char *password); ++typedef int (*ne_auth_creds)(void *userdata, const char * auth_protocol, ++ const char *realm, int attempt, char *username, char *password); + + /* Set callbacks to provide credentials for server and proxy + * authentication, using the default set of authentication protocols. +--- src/ne_defs.h 2010-01-11 23:57:34.000000000 +0100 ++++ src/ne_defs.h 2011-02-03 10:26:20.000000000 +0100 +@@ -41,7 +41,7 @@ + #endif + + /* define ssize_t for Win32 */ +-#if defined(WIN32) && !defined(ssize_t) ++#if defined(WIN32) && !defined(ssize_t) && !defined(__MINGW32__) + #define ssize_t int + #endif + +--- src/ne_locks.c 2007-02-05 11:09:27.000000000 +0100 ++++ src/ne_locks.c 2011-02-03 10:26:21.000000000 +0100 +@@ -579,6 +579,23 @@ + const char *token = ne_get_response_header(ctx->req, "Lock-Token"); + /* at the root element; retrieve the Lock-Token header, + * and bail if it wasn't given. */ ++#ifdef IIS_LOCK_BUG_WORKAROUND ++ /* MS IIS violates RFC 2518/4918. It does not send a Lock-Token response ++ header upon successful creation of a new lock. As a workaround, we ++ will try to pick the lock token from the response body (although ++ this is not 100% safe in case of multiple activelocks). */ ++ if (token == NULL) ++ NE_DEBUG(NE_DBG_LOCKS, ++ "Ignoring missing LOCK response Lock-Token header\n"); ++ ++ if (token != NULL) { ++ if (token[0] == '<') token++; ++ ctx->token = ne_strdup(token); ++ ne_shave(ctx->token, ">"); ++ NE_DEBUG(NE_DBG_LOCKS, "lk_startelm: Finding token %s\n", ++ ctx->token); ++ } ++#else + if (token == NULL) { + ne_xml_set_error(ctx->parser, + _("LOCK response missing Lock-Token header")); +@@ -590,12 +607,28 @@ + ne_shave(ctx->token, ">"); + NE_DEBUG(NE_DBG_LOCKS, "lk_startelm: Finding token %s\n", + ctx->token); ++#endif + } + + /* TODO: only accept 'prop' as root for LOCK response */ + if (!can_accept(parent, id)) + return NE_XML_DECLINE; + ++#ifdef IIS_LOCK_BUG_WORKAROUND ++ if (id == ELM_activelock && ctx->found) { ++ /* Found another activelock... */ ++ const char *token = ne_get_response_header(ctx->req, "Lock-Token"); ++ if (token == NULL) { ++ /* Response contains more than one activelock and no Lock-Token ++ * response header. We are doomed. No safe workaround for IIS ++ * lock bug possible. */ ++ ne_xml_set_error(ctx->parser, ++ _("LOCK response missing Lock-Token header and more than one activelock")); ++ return NE_XML_ABORT; ++ } ++ } ++#endif ++ + if (id == ELM_activelock && !ctx->found) { + /* a new activelock */ + ne_lock_free(&ctx->active); +@@ -621,7 +654,12 @@ + return -1; + + if (state == ELM_activelock) { ++#ifdef IIS_LOCK_BUG_WORKAROUND ++ if (ctx->active.token) { ++ ctx->token = ne_strdup(ctx->active.token); ++#else + if (ctx->active.token && strcmp(ctx->active.token, ctx->token) == 0) { ++#endif + ctx->found = 1; + } + } +--- src/ne_locks.h 2006-01-02 12:43:19.000000000 +0100 ++++ src/ne_locks.h 2011-02-03 10:26:21.000000000 +0100 +@@ -22,6 +22,10 @@ + #ifndef NE_LOCKS_H + #define NE_LOCKS_H + ++# if defined __GNUC__ ++# pragma GCC system_header ++# endif ++ + #include "ne_request.h" /* for ne_session + ne_request */ + #include "ne_uri.h" /* for ne_uri */ + +--- src/ne_sspi.c 2007-08-10 17:26:08.000000000 +0200 ++++ src/ne_sspi.c 2011-02-03 10:26:21.000000000 +0100 +@@ -206,6 +206,45 @@ + } + + /* ++ * Simplification wrapper arround AcquireCredentialsHandle as most of ++ * the parameters do not change. ++ */ ++static int acquireCredentialsHandleForUsername(CredHandle * credentials, char *package, const char *username, const char *password) ++{ ++ SECURITY_STATUS status; ++ TimeStamp timestamp; ++ ++ const char *domain = ""; ++ ++ int rc, rcISC; ++ SecPkgInfo *secPackInfo; ++ SEC_WINNT_AUTH_IDENTITY *nameAndPwd = NULL; ++ int bytesReceived = 0, bytesSent = 0; ++ ++ nameAndPwd = (SEC_WINNT_AUTH_IDENTITY *) malloc( sizeof(SEC_WINNT_AUTH_IDENTITY) ); ++ memset( nameAndPwd, '\0', sizeof (*nameAndPwd) ); ++ nameAndPwd->Domain = (unsigned char *) _strdup( domain? domain: "" ); ++ nameAndPwd->DomainLength = domain? strlen( domain ): 0; ++ nameAndPwd->User = (unsigned char *) _strdup( username? username: "" ); ++ nameAndPwd->UserLength = username? strlen( username ): 0; ++ nameAndPwd->Password = (unsigned char *) _strdup( password? password: "" ); ++ nameAndPwd->PasswordLength = password? strlen( password ): 0; ++ nameAndPwd->Flags = SEC_WINNT_AUTH_IDENTITY_ANSI; ++ ++ status = pSFT->AcquireCredentialsHandle( NULL, package, SECPKG_CRED_OUTBOUND, ++ NULL, nameAndPwd, NULL, NULL, credentials, ×tamp ); ++ ++ if (status != SEC_E_OK) { ++ NE_DEBUG(NE_DBG_HTTPAUTH, ++ "sspi: AcquireCredentialsHandle [fail] [%x].\n", status); ++ return -1; ++ } ++ ++ return 0; ++} ++ ++ ++/* + * Wrapper arround initializeSecurityContext. Supplies several + * default parameters as well as logging in case of errors. + */ +@@ -483,7 +522,7 @@ + * Processes received authentication tokens as well as supplies the + * response token. + */ +-int ne_sspi_authenticate(void *context, const char *base64Token, char **responseToken) ++int ne_sspi_authenticate(void *context, const char *base64Token, char **responseToken, const char* username, const char* password) + { + SecBufferDesc outBufferDesc; + SecBuffer outBuffer; +@@ -561,13 +600,22 @@ + /* Reset any existing context since we are starting over */ + resetContext(sspiContext); + +- if (acquireCredentialsHandle +- (&sspiContext->credentials, sspiContext->mechanism) != SEC_E_OK) { +- freeBuffer(&outBufferDesc); +- NE_DEBUG(NE_DBG_HTTPAUTH, +- "sspi: acquireCredentialsHandle failed.\n"); +- return -1; +- } ++ if (strlen(username) != 0) { ++ if (acquireCredentialsHandleForUsername ++ (&sspiContext->credentials, sspiContext->mechanism, username, password) != SEC_E_OK) { ++ freeBuffer(&outBufferDesc); ++ NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: acquireCredentialsHandleForUsername failed.\n"); ++ return -1; ++ } ++ } else { ++ if (acquireCredentialsHandle ++ (&sspiContext->credentials, sspiContext->mechanism) != SEC_E_OK) { ++ freeBuffer(&outBufferDesc); ++ NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: acquireCredentialsHandle failed.\n"); ++ return -1; ++ } ++ } ++ + + securityStatus = + initializeSecurityContext(&sspiContext->credentials, NULL, +--- src/ne_sspi.h 2006-02-12 13:05:14.000000000 +0100 ++++ src/ne_sspi.h 2011-02-03 10:26:21.000000000 +0100 +@@ -41,7 +41,7 @@ + int ne_sspi_clear_context(void *context); + + int ne_sspi_authenticate(void *context, const char *base64Token, +- char **responseToken); ++ char **responseToken, const char* username, const char* password); + + #endif /* HAVE_SSPI */ + +--- src/ne_uri.c 2007-12-05 12:04:47.000000000 +0100 ++++ src/ne_uri.c 2011-02-03 10:26:21.000000000 +0100 +@@ -42,7 +42,7 @@ + #include "ne_alloc.h" + #include "ne_uri.h" + +-/* URI ABNF from RFC 3986: */ ++/* URI ABNF from RFC 3986: (TKR: SharePoint is contradictory to this RFC. So I fix it here. )*/ + + #define PS (0x0001) /* "+" */ + #define PC (0x0002) /* "%" */ +@@ -67,6 +67,9 @@ + + #define OT (0x4000) /* others */ + ++/* TKR new symbol */ ++#define WS (0x8000) /* Whitespaces ( Space, Tab ) */ ++ + #define URI_ALPHA (AL) + #define URI_DIGIT (DG) + +@@ -83,20 +86,21 @@ + /* pchar = unreserved / pct-encoded / sub-delims / ":" / "@" */ + #define URI_PCHAR (URI_UNRESERVED | PC | URI_SUBDELIM | CL | AT) + /* invented: segchar = pchar / "/" */ +-#define URI_SEGCHAR (URI_PCHAR | FS) ++/* (TKR) WS added */ ++#define URI_SEGCHAR (URI_PCHAR | FS | WS) + /* query = *( pchar / "/" / "?" ) */ + #define URI_QUERY (URI_PCHAR | FS | QU) + /* fragment == query */ + #define URI_FRAGMENT URI_QUERY + + /* any characters which should be path-escaped: */ +-#define URI_ESCAPE ((URI_GENDELIM & ~(FS)) | URI_SUBDELIM | OT | PC) ++#define URI_ESCAPE ((URI_GENDELIM & ~(FS)) | URI_SUBDELIM | OT | WS | PC) + + static const unsigned int uri_chars[256] = { + /* 0xXX x0 x2 x4 x6 x8 xA xC xE */ +-/* 0x */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, ++/* 0x */ OT, OT, OT, OT, OT, OT, OT, OT, OT, WS, OT, OT, OT, OT, OT, OT, + /* 1x */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, +-/* 2x */ OT, SD, OT, GD, SD, PC, SD, SD, SD, SD, SD, PS, SD, DS, DT, FS, ++/* 2x */ WS, SD, OT, GD, SD, PC, SD, SD, SD, SD, SD, PS, SD, DS, DT, FS, + /* 3x */ DG, DG, DG, DG, DG, DG, DG, DG, DG, DG, CL, SD, OT, SD, OT, QU, + /* 4x */ AT, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, + /* 5x */ AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, GD, OT, GD, OT, US, +--- src/ne_utils.c 2006-03-07 10:36:43.000000000 +0100 ++++ src/ne_utils.c 2011-02-03 10:26:21.000000000 +0100 +@@ -118,6 +118,9 @@ + #ifdef HAVE_GNUTLS + ", GNU TLS " LIBGNUTLS_VERSION + #endif /* HAVE_GNUTLS */ ++#ifdef HAVE_SSPI ++ ", SSPI" ++#endif /* HAVE_SSPI */ + "." + ; + +@@ -137,7 +140,7 @@ + switch (feature) { + #if defined(NE_HAVE_SSL) || defined(NE_HAVE_ZLIB) || defined(NE_HAVE_IPV6) \ + || defined(NE_HAVE_SOCKS) || defined(NE_HAVE_LFS) \ +- || defined(NE_HAVE_TS_SSL) || defined(NE_HAVE_I18N) ++ || defined(NE_HAVE_TS_SSL) || defined(NE_HAVE_I18N) || defined(HAVE_SSPI) + #ifdef NE_HAVE_SSL + case NE_FEATURE_SSL: + #endif +@@ -159,6 +162,9 @@ + #ifdef NE_HAVE_I18N + case NE_FEATURE_I18N: + #endif ++#ifdef HAVE_SSPI ++ case NE_FEATURE_SSPI: ++#endif + return 1; + #endif /* NE_HAVE_* */ + default: +--- src/ne_utils.h 2007-07-16 08:54:57.000000000 +0200 ++++ src/ne_utils.h 2011-02-03 10:26:21.000000000 +0100 +@@ -54,6 +54,7 @@ + #define NE_FEATURE_SOCKS (5) /* SOCKSv5 support */ + #define NE_FEATURE_TS_SSL (6) /* Thread-safe SSL/TLS support */ + #define NE_FEATURE_I18N (7) /* i18n error message support */ ++#define NE_FEATURE_SSPI (8) /* NTLM/Negotiate authentication protocol via SSPI */ + + /* Returns non-zero if library is built with support for the given + * NE_FEATURE_* feature code 'code'. */ +--- src/ne_openssl.c ++++ src/ne_openssl.c +@@ -41,6 +41,13 @@ + #include + #endif + ++#ifdef WIN32 ++#define X509_NAME WIN32_X509_NAME ++#include ++#include ++#undef X509_NAME ++#endif ++ + #include "ne_ssl.h" + #include "ne_string.h" + #include "ne_session.h" +@@ -798,6 +798,31 @@ + X509_STORE_load_locations(store, NE_SSL_CA_BUNDLE, NULL); + #else + X509_STORE_set_default_paths(store); ++#ifdef WIN32 ++ { ++ HCERTSTORE hStore; ++ PCCERT_CONTEXT pContext = NULL; ++ X509 *x509; ++ ++ hStore = CertOpenSystemStore(0, "ROOT"); ++ if (hStore) ++ { ++ while (pContext = CertEnumCertificatesInStore(hStore, pContext)) ++ { ++ x509 = d2i_X509(NULL, &pContext->pbCertEncoded, pContext->cbCertEncoded); ++ if (x509) ++ { ++ X509_STORE_add_cert(store, x509); ++ X509_free(x509); ++ } ++ } ++ } ++ ++ CertFreeCertificateContext(pContext); ++ CertCloseStore(hStore, 0); ++ } ++#endif ++ + #endif + } + diff --git a/external/neon/neon_ne_set_request_flag.patch b/external/neon/neon_ne_set_request_flag.patch new file mode 100644 index 000000000000..3bcafd62fee6 --- /dev/null +++ b/external/neon/neon_ne_set_request_flag.patch @@ -0,0 +1,11 @@ +--- src/ne_request.c 2010-09-28 13:57:26.000000000 +0200 ++++ src/ne_request.c 2011-05-18 12:39:05.134445529 +0200 +@@ -529,7 +529,7 @@ + + void ne_set_request_flag(ne_request *req, ne_request_flag flag, int value) + { +- if (flag < NE_SESSFLAG_LAST) { ++ if (flag < NE_REQFLAG_LAST) { + req->flags[flag] = value; + } + } diff --git a/external/neon/neon_with_gnutls.patch b/external/neon/neon_with_gnutls.patch new file mode 100644 index 000000000000..ed8b7faadebf --- /dev/null +++ b/external/neon/neon_with_gnutls.patch @@ -0,0 +1,29 @@ +--- src/ne_gnutls.c 2009-12-02 23:40:41.000000000 +0200 ++++ src/ne_gnutls.c 2013-03-29 13:41:00.429857276 +0200 +@@ -48,6 +48,26 @@ + #include + #endif + ++ ++/* GnuTLS removed these symbols from 2.99.0. ++ * ++ * This is a dodgy solution to avoid further patching of neon ++ * sources */ ++#if LIBGNUTLS_VERSION_NUMBER >= 0x026300 ++# define gnutls_pkcs12 gnutls_pkcs12_t ++# define gnutls_pkcs12_bag gnutls_pkcs12_bag_t ++# define gnutls_pkcs12_bag_type gnutls_pkcs12_bag_type_t ++# define gnutls_certificate_verify_peers(_ssl) ({ \ ++ int __status_ ## __LINE__ = 0; \ ++ gnutls_certificate_verify_peers2((_ssl), &__status_ ## __LINE__) == 0 \ ++ ? __status_ ## __LINE__ : -1; \ ++ }) ++#elif LIBGNUTLS_VERSION_NUMBER >= 0x020303 ++/* GnuTLS had these symbols since 2.3.3. */ ++# define HAVE_GNUTLS_CERTIFICATE_GET_X509_CAS ++#endif /* LIBGNUTLS_VERSION_NUMBER */ ++ ++ + #include "ne_ssl.h" + #include "ne_string.h" + #include "ne_session.h" diff --git a/neon/Library_neon.mk b/neon/Library_neon.mk deleted file mode 100644 index d391a3ea3472..000000000000 --- a/neon/Library_neon.mk +++ /dev/null @@ -1,106 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# - -$(eval $(call gb_Library_Library,neon)) - -$(eval $(call gb_Library_use_unpacked,neon,neon)) - -$(eval $(call gb_Library_use_externals,neon,\ - gnutls \ - libxml2 \ - libgcrypt \ - openssl \ - openssl_headers \ - zlib \ -)) - -$(eval $(call gb_Library_set_visibility_default,neon)) - -# neon has its share of warning... let's spare use -# the pointless spamming -$(eval $(call gb_Library_add_cflags,neon,\ - -w \ -)) - -ifneq ($(debug),) -$(eval $(call gb_Library_add_cflags,neon,\ - -DNE_DEBUGGING \ -)) -endif - -$(eval $(call gb_Library_set_warnings_not_errors,neon)) - -$(eval $(call gb_Library_add_generated_cobjects,neon,\ - UnpackedTarball/neon/src/ne_207 \ - UnpackedTarball/neon/src/ne_acl3744 \ - UnpackedTarball/neon/src/ne_alloc \ - UnpackedTarball/neon/src/ne_auth \ - UnpackedTarball/neon/src/ne_basic \ - UnpackedTarball/neon/src/ne_compress \ - UnpackedTarball/neon/src/ne_dates \ - UnpackedTarball/neon/src/ne_i18n \ - UnpackedTarball/neon/src/ne_locks \ - UnpackedTarball/neon/src/ne_md5 \ - UnpackedTarball/neon/src/ne_props \ - UnpackedTarball/neon/src/ne_redirect \ - UnpackedTarball/neon/src/ne_request \ - UnpackedTarball/neon/src/ne_session \ - UnpackedTarball/neon/src/ne_socket \ - UnpackedTarball/neon/src/ne_socks \ - UnpackedTarball/neon/src/ne_string \ - UnpackedTarball/neon/src/ne_uri \ - UnpackedTarball/neon/src/ne_utils \ - UnpackedTarball/neon/src/ne_xml \ - UnpackedTarball/neon/src/ne_xmlreq \ -)) - - -ifneq ($(DISABLE_OPENSSL),TRUE) -$(eval $(call gb_Library_add_generated_cobjects,neon,\ - UnpackedTarball/neon/src/ne_openssl \ -)) -else -$(eval $(call gb_Library_add_generated_cobjects,neon,\ - UnpackedTarball/neon/src/ne_gnutls \ -)) -endif - - -ifeq ($(OS),WNT) -$(eval $(call gb_Library_use_system_win32_libs,neon,\ - ws2_32 \ - crypt32 \ -)) - -ifeq ($(COM),MSC) -$(eval $(call gb_Library_add_ldflags,neon,\ - /DEF:$(SRCDIR)/neon/neon.def \ -)) -endif - -$(eval $(call gb_Library_add_generated_cobjects,neon,\ - UnpackedTarball/neon/src/ne_sspi \ -)) - -else -ifneq ($(DISABLE_OPENSSL),TRUE) -$(eval $(call gb_Library_add_generated_cobjects,neon,\ - UnpackedTarball/neon/src/ne_ntlm \ -)) -endif - -endif - -ifeq ($(OS),LINUX) -$(eval $(call gb_Library_add_libs,neon,\ - -ldl \ -)) -endif - -# vim: set noet sw=4 ts=4: diff --git a/neon/Makefile b/neon/Makefile deleted file mode 100644 index ccb1c85a04da..000000000000 --- a/neon/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- - -module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) - -include $(module_directory)/../solenv/gbuild/partial_build.mk - -# vim: set noet sw=4 ts=4: diff --git a/neon/Module_neon.mk b/neon/Module_neon.mk deleted file mode 100644 index 26d4b4d6d896..000000000000 --- a/neon/Module_neon.mk +++ /dev/null @@ -1,21 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# - -$(eval $(call gb_Module_Module,neon)) - -ifeq ($(SYSTEM_NEON),NO) - -$(eval $(call gb_Module_add_targets,neon,\ - Library_neon \ - UnpackedTarball_neon \ -)) - -endif - -# vim: set noet sw=4 ts=4: diff --git a/neon/README b/neon/README deleted file mode 100644 index 9a40fd74890b..000000000000 --- a/neon/README +++ /dev/null @@ -1 +0,0 @@ -Web library to help deal with WebDAV or other protocols, from [http://www.webdav.org/neon/]. diff --git a/neon/UnpackedTarball_neon.mk b/neon/UnpackedTarball_neon.mk deleted file mode 100644 index a6cb87b54e19..000000000000 --- a/neon/UnpackedTarball_neon.mk +++ /dev/null @@ -1,26 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# - -$(eval $(call gb_UnpackedTarball_UnpackedTarball,neon)) - -$(eval $(call gb_UnpackedTarball_set_tarball,neon,$(NEON_TARBALL))) - -$(eval $(call gb_UnpackedTarball_add_files,neon,src,\ - neon/configs/config.h \ -)) - -$(eval $(call gb_UnpackedTarball_set_patchlevel,neon,0)) - -$(eval $(call gb_UnpackedTarball_add_patches,neon,\ - neon/neon.patch \ - neon/neon_ne_set_request_flag.patch \ - neon/neon_with_gnutls.patch \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/neon/configs/config.h b/neon/configs/config.h deleted file mode 100644 index b0fdf22559e3..000000000000 --- a/neon/configs/config.h +++ /dev/null @@ -1,600 +0,0 @@ -/* Contents kept in sync with config.h.in from neon 0.29.5 */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* Define to specific EGD socket path */ -/* #undef EGD_PATH */ - -/* Define if EGD should be supported */ -/* #undef ENABLE_EGD */ - -/* Define if GSS_C_NT_HOSTBASED_SERVICE is not defined otherwise */ -/* #undef GSS_C_NT_HOSTBASED_SERVICE */ - -/* Define to 1 if you have the header file. */ -#ifdef UNX -#define HAVE_ARPA_INET_H 1 -#endif - -/* Define to 1 if you have the `bind_textdomain_codeset' function. */ -/* #undef HAVE_BIND_TEXTDOMAIN_CODESET */ - -/* Define to 1 if you have the `CRYPTO_set_idptr_callback' function. */ -/* #undef HAVE_CRYPTO_SET_IDPTR_CALLBACK */ - -/* Define to 1 if you have the declaration of `h_errno', and to 0 if you - don't. */ -#ifdef WIN32 -#define HAVE_DECL_H_ERRNO 1 -#endif - -/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't. - */ -#ifdef LINUX -#define HAVE_DECL_STPCPY 1 -#endif - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#ifdef LINUX -#define HAVE_DECL_STRERROR_R 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifdef UNX -#define HAVE_DLFCN_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define if you have expat */ -/* #undef HAVE_EXPAT */ - -/* Define to 1 if you have the `fcntl' function. */ -#ifdef UNX -#define HAVE_FCNTL 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifdef UNX -#define HAVE_FCNTL_H 1 -#endif - -/* Define to 1 if you have the `fstat64' function. */ -#define HAVE_FSTAT64 - -/* Define to 1 if you have the `gai_strerror' function. */ -#define HAVE_GAI_STRERROR 1 - -/* Define to 1 if you have the `gethostname' function. */ -/* #undef HAVE_GETHOSTNAME */ - -/* Define to 1 if you have the `getnameinfo' function. */ -/* #undef HAVE_GETNAMEINFO */ - -/* Define to 1 if you have the `getsockopt' function. */ -#ifdef UNX -#define HAVE_GETSOCKOPT 1 -#endif - -#ifdef DISABLE_OPENSSL -/* Define if GnuTLS support is enabled */ -#define HAVE_GNUTLS - -/* Define to 1 if you have the `gnutls_certificate_get_x509_cas' function. */ -/* #undef HAVE_GNUTLS_CERTIFICATE_GET_X509_CAS */ - -/* Define to 1 if you have the `gnutls_certificate_verify_peers2' function. */ -#define HAVE_GNUTLS_CERTIFICATE_VERIFY_PEERS2 - -/* Define to 1 if you have the `gnutls_session_get_data2' function. */ -#define HAVE_GNUTLS_SESSION_GET_DATA2 - -/* Define to 1 if you have the `gnutls_sign_callback_set' function. */ -#define HAVE_GNUTLS_SIGN_CALLBACK_SET - -/* Define to 1 if you have the `gnutls_x509_dn_get_rdn_ava' function. */ -#define HAVE_GNUTLS_X509_DN_GET_RDN_AVA -#endif /* DISABLE_OPENSSL */ - -/* Define if GSSAPI support is enabled */ -/* #undef HAVE_GSSAPI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GSSAPI_GSSAPI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GSSAPI_H */ - -/* Define to 1 if you have the `gss_init_sec_context' function. */ -/* #undef HAVE_GSS_INIT_SEC_CONTEXT */ - -/* Define to 1 if you have the `hstrerror' function. */ -/* #undef HAVE_HSTRERROR */ - -/* Define to 1 if you have the `iconv' function. */ -/* #undef HAVE_ICONV */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ICONV_H */ - -/* Define to 1 if you have the `inet_ntop' function. */ -#ifdef UNX -#define HAVE_INET_NTOP 1 -#endif - -/* Define to 1 if you have the `inet_pton' function. */ -/* #undef HAVE_INET_PTON */ - -/* Define to 1 if you have the header file. */ -#ifdef UNX -#define HAVE_INTTYPES_H 1 -#endif - -/* Define to 1 if you have the `isatty' function. */ -#define HAVE_ISATTY 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LIBINTL_H */ - -/* Define if libproxy is supported */ -/* #undef HAVE_LIBPROXY */ - -/* Define if you have libxml */ -#define HAVE_LIBXML 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBXML_PARSER_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBXML_XMLVERSION_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if you have the `lseek64' function. */ -#define HAVE_LSEEK64 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -#ifdef UNX -#define HAVE_NETDB_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifdef UNX -#define HAVE_NETINET_IN_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifdef UNX -#define HAVE_NETINET_TCP_H 1 -#endif - -#ifndef DISABLE_OPENSSL -/* Define if NTLM is supported */ -#ifndef WIN32 -#define HAVE_NTLM 1 -#endif - -/* Define if OpenSSL support is enabled */ -#define HAVE_OPENSSL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_OPENSSLV_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_SSL_H 1 -#endif /* !DISABLE_OPENSSL */ - -/* Define if pakchois library supported */ -/* #undef HAVE_PAKCHOIS */ - -/* Define to 1 if you have the `pipe' function. */ -#define HAVE_PIPE 1 - -/* Define to 1 if you have the `poll' function. */ -#define HAVE_POLL 1 - -/* Define to 1 if you have the `pthread_mutex_init' function. */ -/* #undef HAVE_PTHREAD_MUTEX_INIT */ - -/* Define to 1 if you have the `pthread_mutex_lock' function. */ -/* #undef HAVE_PTHREAD_MUTEX_LOCK */ - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if you have the `setsockopt' function. */ -#if defined (LINUX) || defined (WIN32) -#define HAVE_SETSOCKOPT 1 -#endif - -/* Define to 1 if you have the `setvbuf' function. */ -#define HAVE_SETVBUF 1 - -/* Define to 1 if you have the `shutdown' function. */ -#ifdef LINUX -#define HAVE_SHUTDOWN 1 -#endif - -/* Define to 1 if you have the `signal' function. */ -#define HAVE_SIGNAL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the `snprintf' function. */ -#ifdef UNX -#define HAVE_SNPRINTF 1 -#endif - -#ifdef WIN32 -#define snprintf _snprintf -#endif - -/* Define to 1 if the system has the type `socklen_t'. */ -#ifdef UNX -#define HAVE_SOCKLEN_T 1 -#endif - -/* Define to 1 if you have the `SSL_SESSION_cmp' function. */ -/* #undef HAVE_SSL_SESSION_CMP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDARG_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -#ifdef LINUX -#define HAVE_STPCPY 1 -#endif - -/* Define to 1 if you have the `strcasecmp' function. */ -#ifdef UNX -#define HAVE_STRCASECMP 1 -#endif - -#ifdef WIN32 -#define strcasecmp strcmpi -#endif - -/* Define to 1 if you have the `strerror_r' function. */ -#ifdef LINUX -#define HAVE_STRERROR_R 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifdef UNX -#define HAVE_STRINGS_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strtoll' function. */ -#define HAVE_STRTOLL 1 - -/* Define to 1 if you have the `strtoq' function. */ -/* #undef HAVE_STRTOQ */ - -/* Define to 1 if `tm_gmtoff' is member of `struct tm'. */ -#ifdef LINUX -#define HAVE_STRUCT_TM_TM_GMTOFF 1 -#endif - -/* Define to 1 if `__tm_gmtoff' is member of `struct tm'. */ -/* #undef HAVE_STRUCT_TM___TM_GMTOFF */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_LIMITS_H */ - -/* Define to 1 if you have the header file. */ -#ifdef UNX -#define HAVE_SYS_POLL_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifdef UNX -#define HAVE_SYS_SELECT_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#ifdef UNX -#define HAVE_SYS_SOCKET_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#ifdef UNX -#define HAVE_SYS_TIME_H 1 -#endif - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define if the timezone global is available */ -#ifndef MACOSX -#define HAVE_TIMEZONE 1 -#endif - -/* Use trio printf replacement library */ -/* #undef HAVE_TRIO */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_TRIO_H */ - -/* Define to 1 if you have the header file. */ -#ifdef UNX -#define HAVE_UNISTD_H 1 -#endif - -/* Define to 1 if you have the `usleep' function. */ -#ifdef UNX -#define HAVE_USLEEP 1 -#endif - -/* Define to 1 if you have the `vsnprintf' function. */ -#if defined( UNX ) || defined(_MSC_VER) -#define HAVE_VSNPRINTF 1 -#endif - -#ifdef __MINGW32__ -#define vsnprintf _vsnprintf -#endif - -/* Define to be location of localedir */ -/* #undef LOCALEDIR */ - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -/* #undef LT_OBJDIR */ - -/* Defined when neon is built as a library */ -#define NEON_IS_LIBRARY 1 - -/* Define to be the neon version string */ -#define NEON_VERSION "0.29.5" - -/* Define to enable debugging */ -/* #undef NE_DEBUGGING */ - -/* Define to be printf format string for ne_off_t */ -/* #undef NE_FMT_NE_OFF_T */ - -/* Define to be printf format string for off64_t */ -#define NE_FMT_OFF64_T "lld" - -/* Define to be printf format string for off_t */ -#define NE_FMT_OFF_T "ld" - -/* Define to be printf format string for size_t */ -#define NE_FMT_SIZE_T "u" - -/* Define to be printf format string for ssize_t */ -#define NE_FMT_SSIZE_T "d" - -/* Define to be printf format string for time_t */ -#define NE_FMT_TIME_T "ld" - -/* Define to be printf format string for XML_Size */ -/* #undef NE_FMT_XML_SIZE */ - -/* Defined if DAV is supported */ -#define NE_HAVE_DAV 1 - -/* Defined if I18N is supported */ -/* #undef NE_HAVE_I18N */ - -/* Defined if IPV6 is supported */ -#define NE_HAVE_IPV6 1 - -/* Defined if LFS is supported */ -#define NE_HAVE_LFS 1 - -/* Defined if LIBPXY is supported */ -/* #undef NE_HAVE_LIBPXY */ - -/* Defined if SSL is supported */ -#define NE_HAVE_SSL - -/* Defined if TS_SSL is supported */ -/* #undef NE_HAVE_TS_SSL */ - -/* Defined if ZLIB is supported */ -#define NE_HAVE_ZLIB 1 - -/* Define to be filename of an SSL CA root bundle */ -/* #undef NE_SSL_CA_BUNDLE */ - -/* Define if poll() should be used */ -#ifdef UNX -#define NE_USE_POLL 1 -#endif - -/* Define to be neon library major version */ -#define NE_VERSION_MAJOR (0) - -/* Define to be neon library minor version */ -#define NE_VERSION_MINOR (29) - -/* Define to be neon library patch version */ -#define NE_VERSION_PATCH (5) - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "neon@webdav.org" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "neon" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "neon 0.29.5" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "neon" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.29.5" - -/* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of `long', as computed by sizeof. */ -#define SIZEOF_LONG 4 - -/* The size of `long long', as computed by sizeof. */ -#define SIZEOF_LONG_LONG 8 - -/* The size of `off64_t', as computed by sizeof. */ -#define SIZEOF_OFF64_T 8 - -/* The size of `off_t', as computed by sizeof. */ -#define SIZEOF_OFF_T 4 - -/* The size of `size_t', as computed by sizeof. */ -#define SIZEOF_SIZE_T 4 - -/* The size of `ssize_t', as computed by sizeof. */ -#define SIZEOF_SSIZE_T 4 - -/* The size of `time_t', as computed by sizeof. */ -#define SIZEOF_TIME_T 4 - -/* The size of `XML_Size', as computed by sizeof. */ -/* #undef SIZEOF_XML_SIZE */ - -/* Define to 1 if you have the ANSI C header files. */ -#ifdef SOLARIS -#define STDC_HEADERS 1 -#endif - -/* Define to 1 if strerror_r returns char *. */ -#ifdef LINUX -#define STRERROR_R_CHAR_P 1 -#endif - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define if getaddrinfo supports AI_ADDRCONFIG */ -/* #undef USE_GAI_ADDRCONFIG */ - -/* Define if getaddrinfo() should be used */ -#define USE_GETADDRINFO 1 - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined (SOLARIS) && defined (SPARC) -#define WORDS_BIGENDIAN 1 -#endif - -/* Always defined to enable GNU extensions */ -#define _GNU_SOURCE 1 - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define if in_addr_t is not available */ -/* #undef in_addr_t */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#if defined (SOLARIS) && defined (__SUNPRO_C) -#define inline -#endif -#endif - -/* Define to `long int' if does not define. */ -/* #undef off_t */ - -/* Define to `int' if does not define. */ -/* #undef pid_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define if socklen_t is not available */ -/* #undef socklen_t */ - -/* MS IIS does not send Lock-Token response header after creation of a */ -/* new lock. This violates RFC, but... if we want to talk with this */ -/* beast we need a workaround */ -#define IIS_LOCK_BUG_WORKAROUND 1 - - -/* Enable leak-tracking versions of ne_*alloc when NEON_MEMLEAK is enabled */ -#ifdef NEON_MEMLEAK -# include "memleak.h" -#endif - -#if defined(HAVE_STPCPY) && defined(HAVE_DECL_STPCPY) && !HAVE_DECL_STPCPY && !defined(stpcpy) -char *stpcpy(char *, const char *); -#endif - -#ifdef WIN32 - -#include - -#define HAVE_MEMCPY 1 - -#define strncasecmp strnicmp -#define inline __inline -#define WIN32_LEAN_AND_MEAN -#define NOUSER -#define NOGDI -#define NONLS -#define NOCRYPT - -#define HAVE_SSPI 1 - -#endif diff --git a/neon/neon.def b/neon/neon.def deleted file mode 100644 index 3a14d66fbdfe..000000000000 --- a/neon/neon.def +++ /dev/null @@ -1,292 +0,0 @@ -LIBRARY "neon.dll" -HEAPSIZE 0 -EXPORTS - ne_sspi_authenticate; - ne_sspi_clear_context; - ne_sspi_create_context; - ne_sspi_deinit; - ne_sspi_destroy_context; - ne_sspi_init; - ne__negotiate_ssl; - ne__ssl_exit; - ne__ssl_init; - ne_ssl_cert_cmp; - ne_ssl_cert_digest; - ne_ssl_cert_export; - ne_ssl_cert_free; - ne_ssl_cert_identity; - ne_ssl_cert_import; - ne_ssl_cert_issuer; - ne_ssl_cert_read; - ne_ssl_cert_signedby; - ne_ssl_cert_subject; - ne_ssl_cert_validity_time; - ne_ssl_cert_write; - ne_ssl_clicert_decrypt; - ne_ssl_clicert_encrypted; - ne_ssl_clicert_free; - ne_ssl_clicert_name; - ne_ssl_clicert_owner; - ne_ssl_clicert_read; - ne_ssl_context_create; - ne_ssl_context_destroy; - ne_ssl_context_keypair; - ne_ssl_context_set_flag; - ne_ssl_context_set_verify; - ne_ssl_context_trustcert; - ne_ssl_dname_cmp; - ne_ssl_readable_dname; - ne_ssl_set_clicert; - ne_ssl_trust_default_ca; - ne_xml_dispatch_request; - ne_xml_parse_response; - ne_xml_create; - ne_xml_currentline; - ne_xml_destroy; - ne_xml_doc_encoding; - ne_xml_failed; - ne_xml_get_attr; - ne_xml_get_error; - ne_xml_mapid; - ne_xml_parse; - ne_xml_parse_v; - ne_xml_push_handler; - ne_xml_resolve_nspace; - ne_xml_set_error; - ne_debug; - ne_debug_init; - ne_debug_mask; - ne_debug_stream; - ne_has_support; - ne_parse_statusline; - ne_version_match; - ne_version_string; - ne_path_childof; - ne_path_compare; - ne_path_escape; - ne_path_has_trailing_slash; - ne_path_parent; - ne_path_unescape; - ne_uri_cmp; - ne_uri_copy; - ne_uri_defaultport; - ne_uri_free; - ne_uri_parse; - ne_uri_resolve; - ne_uri_unparse; - ne_base64; - ne_buffer_altered; - ne_buffer_append; - ne_buffer_clear; - ne_buffer_concat; - ne_buffer_create; - ne_buffer_destroy; - ne_buffer_finish; - ne_buffer_grow; - ne_buffer_ncreate; - ne_buffer_snprintf; - ne_buffer_zappend; - ne_concat; - ne_qtoken; - ne_shave; - ne_snprintf; - ne_strcasecmp; - ne_strclean; - ne_strerror; - ne_strncasecmp; - ne_token; - ne_tolower_array; - ne_unbase64; - ne_vsnprintf; - ne__sock_sslsock; - ne_addr_destroy; - ne_addr_error; - ne_addr_first; - ne_addr_next; - ne_addr_resolve; - ne_addr_result; - ne_iaddr_cmp; - ne_iaddr_free; - ne_iaddr_make; - ne_iaddr_print; - ne_iaddr_reverse; - ne_iaddr_typeof; - ne_sock_accept; - ne_sock_accept_ssl; - ne_sock_block; - ne_sock_cipher; - ne_sock_close; - ne_sock_connect; - ne_sock_connect_ssl; - ne_sock_connect_timeout; - ne_sock_create; - ne_sock_error; - ne_sock_exit; - ne_sock_fd; - ne_sock_fullread; - ne_sock_fullwrite; - ne_sock_init; - ne_sock_peek; - ne_sock_peer; - ne_sock_prebind; - ne_sock_proxy; - ne_sock_read; - ne_sock_read_timeout; - ne_sock_readline; - ne_sock_sessid; - ne__ssl_set_verify_err; - ne_close_connection; - ne_fill_proxy_uri; - ne_fill_server_uri; - ne_get_error; - ne_get_scheme; - ne_get_server_hostport; - ne_get_session_flag; - ne_hook_close_conn; - ne_hook_create_request; - ne_hook_destroy_request; - ne_hook_destroy_session; - ne_hook_post_headers; - ne_hook_post_send; - ne_hook_pre_send; - ne_session_create; - ne_session_destroy; - ne_session_proxy; - ne_set_addrlist; - ne_set_connect_timeout; - ne_set_error; - ne_set_localaddr; - ne_set_notifier; - ne_set_progress; - ne_set_read_timeout; - ne_set_session_flag; - ne_set_session_private; - ne_set_useragent; - ne_ssl_cert_validity; - ne_ssl_provide_clicert; - ne_ssl_set_verify; - ne_ssl_trust_cert; - ne_unhook_close_conn; - ne_unhook_create_request; - ne_unhook_destroy_request; - ne_unhook_destroy_session; - ne_unhook_post_headers; - ne_unhook_post_send; - ne_unhook_pre_send; - ne_version_pre_http11; - ne_accept_2xx; - ne_accept_always; - ne_add_request_header; - ne_add_response_body_reader; - ne_begin_request; - ne_discard_response; - ne_end_request; - ne_get_request_flag; - ne_get_request_private; - ne_get_response_header; - ne_get_session; - ne_get_session_private; - ne_get_status; - ne_print_request_header; - ne_read_response_block; - ne_read_response_to_fd; - ne_request_create; - ne_request_destroy; - ne_request_dispatch; - ne_response_header_iterate; - ne_set_request_body_buffer; - ne_set_request_body_fd; - ne_set_request_body_provider; - ne_set_request_flag; - ne_set_request_private; - ne_redirect_location; - ne_redirect_register; - ne_propfind_allprop; - ne_propfind_create; - ne_propfind_current_private; - ne_propfind_destroy; - ne_propfind_get_parser; - ne_propfind_get_request; - ne_propfind_named; - ne_propfind_set_private; - ne_propnames; - ne_proppatch; - ne_propset_iterate; - ne_propset_lang; - ne_propset_private; - ne_propset_status; - ne_propset_value; - ne_simple_propfind; - ne_ascii_to_md5; - ne_md5_create_ctx; - ne_md5_destroy_ctx; - ne_md5_dup_ctx; - ne_md5_finish_ascii; - ne_md5_finish_ctx; - ne_md5_process_block; - ne_md5_process_bytes; - ne_md5_read_ctx; - ne_md5_reset_ctx; - ne_md5_stream; - ne_md5_to_ascii; - ne_lock; - ne_lock_copy; - ne_lock_create; - ne_lock_destroy; - ne_lock_discover; - ne_lock_free; - ne_lock_refresh; - ne_lock_using_parent; - ne_lock_using_resource; - ne_lockstore_add; - ne_lockstore_create; - ne_lockstore_destroy; - ne_lockstore_findbyuri; - ne_lockstore_first; - ne_lockstore_next; - ne_lockstore_register; - ne_lockstore_remove; - ne_unlock; - ne_i18n_init; - ne_asctime_parse; - ne_httpdate_parse; - ne_iso8601_parse; - ne_rfc1036_parse; - ne_rfc1123_date; - ne_rfc1123_parse; - ne_decompress_destroy; - ne_decompress_reader; - ne_add_depth_header; - ne_copy; - ne_delete; - ne_get; - ne_get_content_type; - ne_get_range; - ne_getmodtime; - ne_mkcol; - ne_move; - ne_options; - ne_options2; - ne_post; - ne_put; - ne_add_proxy_auth; - ne_add_server_auth; - ne_forget_auth; - ne_set_proxy_auth; - ne_set_server_auth; - ne_calloc; - ne_malloc; - ne_oom_callback; - ne_realloc; - ne_strdup; - ne_strndup; - ne_free; - ne_acl3744_set; - ne_207_create; - ne_207_destroy; - ne_207_get_current_propstat; - ne_207_get_current_response; - ne_207_set_propstat_handlers; - ne_207_set_response_handlers; - ne_accept_207; - ne_simple_request; diff --git a/neon/neon.patch b/neon/neon.patch deleted file mode 100644 index 95d6b55024b3..000000000000 --- a/neon/neon.patch +++ /dev/null @@ -1,423 +0,0 @@ ---- src/ne_auth.c 2010-10-14 17:00:53.000000000 +0200 -+++ src/ne_auth.c 2011-02-03 10:31:22.000000000 +0100 -@@ -367,7 +367,7 @@ - static int get_credentials(auth_session *sess, ne_buffer **errmsg, int attempt, - struct auth_challenge *chall, char *pwbuf) - { -- if (chall->handler->creds(chall->handler->userdata, sess->realm, -+ if (chall->handler->creds(chall->handler->userdata, chall->protocol->name, sess->realm, - chall->handler->attempt++, sess->username, pwbuf) == 0) { - return 0; - } else { -@@ -385,15 +385,19 @@ - { - char *tmp, password[NE_ABUFSIZ]; - -+#if 0 /* Workaround - IIS sends challenge without realm. */ -+ - /* Verify challenge... must have a realm */ - if (parms->realm == NULL) { - challenge_error(errmsg, _("missing realm in Basic challenge")); - return -1; - } -+#endif - - clean_session(sess); - -- sess->realm = ne_strdup(parms->realm); -+ if (parms->realm != NULL) -+ sess->realm = ne_strdup(parms->realm); - - if (get_credentials(sess, errmsg, attempt, parms, password)) { - /* Failed to get credentials */ -@@ -610,10 +614,12 @@ - return NULL; - } - --static int continue_sspi(auth_session *sess, int ntlm, const char *hdr) -+static int continue_sspi(auth_session *sess, int ntlm, const char *hdr, -+ int attempt, struct auth_challenge *parms, ne_buffer **errmsg) - { - int status; - char *response = NULL; -+ char password[NE_ABUFSIZ]; - - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: SSPI challenge.\n"); - -@@ -630,8 +636,17 @@ - return status; - } - } -- -- status = ne_sspi_authenticate(sess->sspi_context, hdr, &response); -+ -+ /* Authentification needs more than one http request. -+ * As long as authentification in progress use the existing credentials. -+ * Otherwise get new credentials.*/ -+ if (!hdr) -+ if (get_credentials(sess, errmsg, attempt, parms, password)) { -+ /* Failed to get credentials */ -+ return -1; -+ } -+ -+ status = ne_sspi_authenticate(sess->sspi_context, hdr, &response, sess->username, password); - if (status) { - return status; - } -@@ -651,7 +666,7 @@ - { - int ntlm = ne_strcasecmp(parms->protocol->name, "NTLM") == 0; - -- return continue_sspi(sess, ntlm, parms->opaque); -+ return continue_sspi(sess, ntlm, parms->opaque, attempt, parms, errmsg); - } - - static int verify_sspi(struct auth_request *req, auth_session *sess, -@@ -674,7 +689,7 @@ - return NE_OK; - } - -- return continue_sspi(sess, ntlm, ptr); -+ return continue_sspi(sess, ntlm, ptr, 0, NULL, NULL); - } - - #endif ---- src/ne_auth.h 2009-09-01 22:13:12.000000000 +0200 -+++ src/ne_auth.h 2011-02-03 10:26:20.000000000 +0100 -@@ -47,8 +47,8 @@ - * Hint: if you just wish to attempt authentication just once (even if - * the user gets the username/password wrong), have the callback - * function use 'attempt' value as the function return value. */ --typedef int (*ne_auth_creds)(void *userdata, const char *realm, int attempt, -- char *username, char *password); -+typedef int (*ne_auth_creds)(void *userdata, const char * auth_protocol, -+ const char *realm, int attempt, char *username, char *password); - - /* Set callbacks to provide credentials for server and proxy - * authentication, using the default set of authentication protocols. ---- src/ne_defs.h 2010-01-11 23:57:34.000000000 +0100 -+++ src/ne_defs.h 2011-02-03 10:26:20.000000000 +0100 -@@ -41,7 +41,7 @@ - #endif - - /* define ssize_t for Win32 */ --#if defined(WIN32) && !defined(ssize_t) -+#if defined(WIN32) && !defined(ssize_t) && !defined(__MINGW32__) - #define ssize_t int - #endif - ---- src/ne_locks.c 2007-02-05 11:09:27.000000000 +0100 -+++ src/ne_locks.c 2011-02-03 10:26:21.000000000 +0100 -@@ -579,6 +579,23 @@ - const char *token = ne_get_response_header(ctx->req, "Lock-Token"); - /* at the root element; retrieve the Lock-Token header, - * and bail if it wasn't given. */ -+#ifdef IIS_LOCK_BUG_WORKAROUND -+ /* MS IIS violates RFC 2518/4918. It does not send a Lock-Token response -+ header upon successful creation of a new lock. As a workaround, we -+ will try to pick the lock token from the response body (although -+ this is not 100% safe in case of multiple activelocks). */ -+ if (token == NULL) -+ NE_DEBUG(NE_DBG_LOCKS, -+ "Ignoring missing LOCK response Lock-Token header\n"); -+ -+ if (token != NULL) { -+ if (token[0] == '<') token++; -+ ctx->token = ne_strdup(token); -+ ne_shave(ctx->token, ">"); -+ NE_DEBUG(NE_DBG_LOCKS, "lk_startelm: Finding token %s\n", -+ ctx->token); -+ } -+#else - if (token == NULL) { - ne_xml_set_error(ctx->parser, - _("LOCK response missing Lock-Token header")); -@@ -590,12 +607,28 @@ - ne_shave(ctx->token, ">"); - NE_DEBUG(NE_DBG_LOCKS, "lk_startelm: Finding token %s\n", - ctx->token); -+#endif - } - - /* TODO: only accept 'prop' as root for LOCK response */ - if (!can_accept(parent, id)) - return NE_XML_DECLINE; - -+#ifdef IIS_LOCK_BUG_WORKAROUND -+ if (id == ELM_activelock && ctx->found) { -+ /* Found another activelock... */ -+ const char *token = ne_get_response_header(ctx->req, "Lock-Token"); -+ if (token == NULL) { -+ /* Response contains more than one activelock and no Lock-Token -+ * response header. We are doomed. No safe workaround for IIS -+ * lock bug possible. */ -+ ne_xml_set_error(ctx->parser, -+ _("LOCK response missing Lock-Token header and more than one activelock")); -+ return NE_XML_ABORT; -+ } -+ } -+#endif -+ - if (id == ELM_activelock && !ctx->found) { - /* a new activelock */ - ne_lock_free(&ctx->active); -@@ -621,7 +654,12 @@ - return -1; - - if (state == ELM_activelock) { -+#ifdef IIS_LOCK_BUG_WORKAROUND -+ if (ctx->active.token) { -+ ctx->token = ne_strdup(ctx->active.token); -+#else - if (ctx->active.token && strcmp(ctx->active.token, ctx->token) == 0) { -+#endif - ctx->found = 1; - } - } ---- src/ne_locks.h 2006-01-02 12:43:19.000000000 +0100 -+++ src/ne_locks.h 2011-02-03 10:26:21.000000000 +0100 -@@ -22,6 +22,10 @@ - #ifndef NE_LOCKS_H - #define NE_LOCKS_H - -+# if defined __GNUC__ -+# pragma GCC system_header -+# endif -+ - #include "ne_request.h" /* for ne_session + ne_request */ - #include "ne_uri.h" /* for ne_uri */ - ---- src/ne_sspi.c 2007-08-10 17:26:08.000000000 +0200 -+++ src/ne_sspi.c 2011-02-03 10:26:21.000000000 +0100 -@@ -206,6 +206,45 @@ - } - - /* -+ * Simplification wrapper arround AcquireCredentialsHandle as most of -+ * the parameters do not change. -+ */ -+static int acquireCredentialsHandleForUsername(CredHandle * credentials, char *package, const char *username, const char *password) -+{ -+ SECURITY_STATUS status; -+ TimeStamp timestamp; -+ -+ const char *domain = ""; -+ -+ int rc, rcISC; -+ SecPkgInfo *secPackInfo; -+ SEC_WINNT_AUTH_IDENTITY *nameAndPwd = NULL; -+ int bytesReceived = 0, bytesSent = 0; -+ -+ nameAndPwd = (SEC_WINNT_AUTH_IDENTITY *) malloc( sizeof(SEC_WINNT_AUTH_IDENTITY) ); -+ memset( nameAndPwd, '\0', sizeof (*nameAndPwd) ); -+ nameAndPwd->Domain = (unsigned char *) _strdup( domain? domain: "" ); -+ nameAndPwd->DomainLength = domain? strlen( domain ): 0; -+ nameAndPwd->User = (unsigned char *) _strdup( username? username: "" ); -+ nameAndPwd->UserLength = username? strlen( username ): 0; -+ nameAndPwd->Password = (unsigned char *) _strdup( password? password: "" ); -+ nameAndPwd->PasswordLength = password? strlen( password ): 0; -+ nameAndPwd->Flags = SEC_WINNT_AUTH_IDENTITY_ANSI; -+ -+ status = pSFT->AcquireCredentialsHandle( NULL, package, SECPKG_CRED_OUTBOUND, -+ NULL, nameAndPwd, NULL, NULL, credentials, ×tamp ); -+ -+ if (status != SEC_E_OK) { -+ NE_DEBUG(NE_DBG_HTTPAUTH, -+ "sspi: AcquireCredentialsHandle [fail] [%x].\n", status); -+ return -1; -+ } -+ -+ return 0; -+} -+ -+ -+/* - * Wrapper arround initializeSecurityContext. Supplies several - * default parameters as well as logging in case of errors. - */ -@@ -483,7 +522,7 @@ - * Processes received authentication tokens as well as supplies the - * response token. - */ --int ne_sspi_authenticate(void *context, const char *base64Token, char **responseToken) -+int ne_sspi_authenticate(void *context, const char *base64Token, char **responseToken, const char* username, const char* password) - { - SecBufferDesc outBufferDesc; - SecBuffer outBuffer; -@@ -561,13 +600,22 @@ - /* Reset any existing context since we are starting over */ - resetContext(sspiContext); - -- if (acquireCredentialsHandle -- (&sspiContext->credentials, sspiContext->mechanism) != SEC_E_OK) { -- freeBuffer(&outBufferDesc); -- NE_DEBUG(NE_DBG_HTTPAUTH, -- "sspi: acquireCredentialsHandle failed.\n"); -- return -1; -- } -+ if (strlen(username) != 0) { -+ if (acquireCredentialsHandleForUsername -+ (&sspiContext->credentials, sspiContext->mechanism, username, password) != SEC_E_OK) { -+ freeBuffer(&outBufferDesc); -+ NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: acquireCredentialsHandleForUsername failed.\n"); -+ return -1; -+ } -+ } else { -+ if (acquireCredentialsHandle -+ (&sspiContext->credentials, sspiContext->mechanism) != SEC_E_OK) { -+ freeBuffer(&outBufferDesc); -+ NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: acquireCredentialsHandle failed.\n"); -+ return -1; -+ } -+ } -+ - - securityStatus = - initializeSecurityContext(&sspiContext->credentials, NULL, ---- src/ne_sspi.h 2006-02-12 13:05:14.000000000 +0100 -+++ src/ne_sspi.h 2011-02-03 10:26:21.000000000 +0100 -@@ -41,7 +41,7 @@ - int ne_sspi_clear_context(void *context); - - int ne_sspi_authenticate(void *context, const char *base64Token, -- char **responseToken); -+ char **responseToken, const char* username, const char* password); - - #endif /* HAVE_SSPI */ - ---- src/ne_uri.c 2007-12-05 12:04:47.000000000 +0100 -+++ src/ne_uri.c 2011-02-03 10:26:21.000000000 +0100 -@@ -42,7 +42,7 @@ - #include "ne_alloc.h" - #include "ne_uri.h" - --/* URI ABNF from RFC 3986: */ -+/* URI ABNF from RFC 3986: (TKR: SharePoint is contradictory to this RFC. So I fix it here. )*/ - - #define PS (0x0001) /* "+" */ - #define PC (0x0002) /* "%" */ -@@ -67,6 +67,9 @@ - - #define OT (0x4000) /* others */ - -+/* TKR new symbol */ -+#define WS (0x8000) /* Whitespaces ( Space, Tab ) */ -+ - #define URI_ALPHA (AL) - #define URI_DIGIT (DG) - -@@ -83,20 +86,21 @@ - /* pchar = unreserved / pct-encoded / sub-delims / ":" / "@" */ - #define URI_PCHAR (URI_UNRESERVED | PC | URI_SUBDELIM | CL | AT) - /* invented: segchar = pchar / "/" */ --#define URI_SEGCHAR (URI_PCHAR | FS) -+/* (TKR) WS added */ -+#define URI_SEGCHAR (URI_PCHAR | FS | WS) - /* query = *( pchar / "/" / "?" ) */ - #define URI_QUERY (URI_PCHAR | FS | QU) - /* fragment == query */ - #define URI_FRAGMENT URI_QUERY - - /* any characters which should be path-escaped: */ --#define URI_ESCAPE ((URI_GENDELIM & ~(FS)) | URI_SUBDELIM | OT | PC) -+#define URI_ESCAPE ((URI_GENDELIM & ~(FS)) | URI_SUBDELIM | OT | WS | PC) - - static const unsigned int uri_chars[256] = { - /* 0xXX x0 x2 x4 x6 x8 xA xC xE */ --/* 0x */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, -+/* 0x */ OT, OT, OT, OT, OT, OT, OT, OT, OT, WS, OT, OT, OT, OT, OT, OT, - /* 1x */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, --/* 2x */ OT, SD, OT, GD, SD, PC, SD, SD, SD, SD, SD, PS, SD, DS, DT, FS, -+/* 2x */ WS, SD, OT, GD, SD, PC, SD, SD, SD, SD, SD, PS, SD, DS, DT, FS, - /* 3x */ DG, DG, DG, DG, DG, DG, DG, DG, DG, DG, CL, SD, OT, SD, OT, QU, - /* 4x */ AT, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, - /* 5x */ AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, GD, OT, GD, OT, US, ---- src/ne_utils.c 2006-03-07 10:36:43.000000000 +0100 -+++ src/ne_utils.c 2011-02-03 10:26:21.000000000 +0100 -@@ -118,6 +118,9 @@ - #ifdef HAVE_GNUTLS - ", GNU TLS " LIBGNUTLS_VERSION - #endif /* HAVE_GNUTLS */ -+#ifdef HAVE_SSPI -+ ", SSPI" -+#endif /* HAVE_SSPI */ - "." - ; - -@@ -137,7 +140,7 @@ - switch (feature) { - #if defined(NE_HAVE_SSL) || defined(NE_HAVE_ZLIB) || defined(NE_HAVE_IPV6) \ - || defined(NE_HAVE_SOCKS) || defined(NE_HAVE_LFS) \ -- || defined(NE_HAVE_TS_SSL) || defined(NE_HAVE_I18N) -+ || defined(NE_HAVE_TS_SSL) || defined(NE_HAVE_I18N) || defined(HAVE_SSPI) - #ifdef NE_HAVE_SSL - case NE_FEATURE_SSL: - #endif -@@ -159,6 +162,9 @@ - #ifdef NE_HAVE_I18N - case NE_FEATURE_I18N: - #endif -+#ifdef HAVE_SSPI -+ case NE_FEATURE_SSPI: -+#endif - return 1; - #endif /* NE_HAVE_* */ - default: ---- src/ne_utils.h 2007-07-16 08:54:57.000000000 +0200 -+++ src/ne_utils.h 2011-02-03 10:26:21.000000000 +0100 -@@ -54,6 +54,7 @@ - #define NE_FEATURE_SOCKS (5) /* SOCKSv5 support */ - #define NE_FEATURE_TS_SSL (6) /* Thread-safe SSL/TLS support */ - #define NE_FEATURE_I18N (7) /* i18n error message support */ -+#define NE_FEATURE_SSPI (8) /* NTLM/Negotiate authentication protocol via SSPI */ - - /* Returns non-zero if library is built with support for the given - * NE_FEATURE_* feature code 'code'. */ ---- src/ne_openssl.c -+++ src/ne_openssl.c -@@ -41,6 +41,13 @@ - #include - #endif - -+#ifdef WIN32 -+#define X509_NAME WIN32_X509_NAME -+#include -+#include -+#undef X509_NAME -+#endif -+ - #include "ne_ssl.h" - #include "ne_string.h" - #include "ne_session.h" -@@ -798,6 +798,31 @@ - X509_STORE_load_locations(store, NE_SSL_CA_BUNDLE, NULL); - #else - X509_STORE_set_default_paths(store); -+#ifdef WIN32 -+ { -+ HCERTSTORE hStore; -+ PCCERT_CONTEXT pContext = NULL; -+ X509 *x509; -+ -+ hStore = CertOpenSystemStore(0, "ROOT"); -+ if (hStore) -+ { -+ while (pContext = CertEnumCertificatesInStore(hStore, pContext)) -+ { -+ x509 = d2i_X509(NULL, &pContext->pbCertEncoded, pContext->cbCertEncoded); -+ if (x509) -+ { -+ X509_STORE_add_cert(store, x509); -+ X509_free(x509); -+ } -+ } -+ } -+ -+ CertFreeCertificateContext(pContext); -+ CertCloseStore(hStore, 0); -+ } -+#endif -+ - #endif - } - diff --git a/neon/neon_ne_set_request_flag.patch b/neon/neon_ne_set_request_flag.patch deleted file mode 100644 index 3bcafd62fee6..000000000000 --- a/neon/neon_ne_set_request_flag.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/ne_request.c 2010-09-28 13:57:26.000000000 +0200 -+++ src/ne_request.c 2011-05-18 12:39:05.134445529 +0200 -@@ -529,7 +529,7 @@ - - void ne_set_request_flag(ne_request *req, ne_request_flag flag, int value) - { -- if (flag < NE_SESSFLAG_LAST) { -+ if (flag < NE_REQFLAG_LAST) { - req->flags[flag] = value; - } - } diff --git a/neon/neon_with_gnutls.patch b/neon/neon_with_gnutls.patch deleted file mode 100644 index ed8b7faadebf..000000000000 --- a/neon/neon_with_gnutls.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- src/ne_gnutls.c 2009-12-02 23:40:41.000000000 +0200 -+++ src/ne_gnutls.c 2013-03-29 13:41:00.429857276 +0200 -@@ -48,6 +48,26 @@ - #include - #endif - -+ -+/* GnuTLS removed these symbols from 2.99.0. -+ * -+ * This is a dodgy solution to avoid further patching of neon -+ * sources */ -+#if LIBGNUTLS_VERSION_NUMBER >= 0x026300 -+# define gnutls_pkcs12 gnutls_pkcs12_t -+# define gnutls_pkcs12_bag gnutls_pkcs12_bag_t -+# define gnutls_pkcs12_bag_type gnutls_pkcs12_bag_type_t -+# define gnutls_certificate_verify_peers(_ssl) ({ \ -+ int __status_ ## __LINE__ = 0; \ -+ gnutls_certificate_verify_peers2((_ssl), &__status_ ## __LINE__) == 0 \ -+ ? __status_ ## __LINE__ : -1; \ -+ }) -+#elif LIBGNUTLS_VERSION_NUMBER >= 0x020303 -+/* GnuTLS had these symbols since 2.3.3. */ -+# define HAVE_GNUTLS_CERTIFICATE_GET_X509_CAS -+#endif /* LIBGNUTLS_VERSION_NUMBER */ -+ -+ - #include "ne_ssl.h" - #include "ne_string.h" - #include "ne_session.h" -- cgit