aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--RELEASE-NOTES1
-rw-r--r--configure.ac1
-rw-r--r--docs/FEATURES2
-rw-r--r--lib/Makefile.m321
-rw-r--r--lib/Makefile.vc61
-rw-r--r--lib/curl_schannel.c14
-rw-r--r--lib/curl_schannel.h9
-rw-r--r--lib/curl_sspi.c63
-rw-r--r--lib/curl_sspi.h1
-rw-r--r--lib/version.c18
-rw-r--r--src/Makefile.m321
-rw-r--r--src/Makefile.vc627
-rw-r--r--winbuild/MakefileBuild.vc17
13 files changed, 23 insertions, 133 deletions
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 0052ecb9a..914d18250 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -18,7 +18,6 @@ This release includes the following changes:
o pop3: Added support for sasl digest-md5 authentication
o pop3: Added support for apop authentication
o sspi: Added support for Schannel SSL/TLS encryption
- o sspi: Changed curl version information output
This release includes the following bugfixes:
diff --git a/configure.ac b/configure.ac
index f56890fa9..8e7fe6d6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3044,7 +3044,6 @@ AC_HELP_STRING([--disable-sspi],[Disable SSPI]),
AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
AC_SUBST(USE_WINDOWS_SSPI, [1])
curl_sspi_msg="enabled"
- LIBS="$LIBS -lversion"
else
AC_MSG_RESULT(no)
AC_MSG_WARN([--enable-sspi Ignored. Only supported on native Windows builds.])
diff --git a/docs/FEATURES b/docs/FEATURES
index 46d886731..34cbebd9c 100644
--- a/docs/FEATURES
+++ b/docs/FEATURES
@@ -125,7 +125,7 @@ FILE
FOOTNOTES
=========
- *1 = requires OpenSSL, GnuTLS, NSS, yassl, axTLS, PolarSSL or Windows SSPI
+ *1 = requires OpenSSL, GnuTLS, NSS, yassl, axTLS, PolarSSL or schannel
*2 = requires OpenLDAP
*3 = requires a GSSAPI-compliant library, such as Heimdal or similar.
*4 = requires FBopenssl
diff --git a/lib/Makefile.m32 b/lib/Makefile.m32
index fd191c119..809612b82 100644
--- a/lib/Makefile.m32
+++ b/lib/Makefile.m32
@@ -185,7 +185,6 @@ endif
endif
ifdef SSPI
CFLAGS += -DUSE_WINDOWS_SSPI
- DLL_LIBS += -lversion
ifdef SCHANNEL
CFLAGS += -DUSE_SCHANNEL
endif
diff --git a/lib/Makefile.vc6 b/lib/Makefile.vc6
index 205b433a3..46c67b264 100644
--- a/lib/Makefile.vc6
+++ b/lib/Makefile.vc6
@@ -123,7 +123,6 @@ CFGSET = FALSE
!IFDEF WINDOWS_SSPI
CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
-WINLIBS = $(WINLIBS) version.lib
!ENDIF
!IFDEF USE_IPV6
diff --git a/lib/curl_schannel.c b/lib/curl_schannel.c
index 3cac4e149..0f49e8d7d 100644
--- a/lib/curl_schannel.c
+++ b/lib/curl_schannel.c
@@ -54,9 +54,12 @@
#include "setup.h"
-#ifdef USE_WINDOWS_SSPI
#ifdef USE_SCHANNEL
+#ifndef USE_WINDOWS_SSPI
+# error "Can't compile SCHANNEL support without SSPI."
+#endif
+
#include "curl_sspi.h"
#include "curl_schannel.h"
#include "sslgen.h"
@@ -974,16 +977,9 @@ void Curl_schannel_cleanup()
size_t Curl_schannel_version(char *buffer, size_t size)
{
- int sspi_major = 0, sspi_minor = 0, sspi_build = 0;
-
- if(!Curl_sspi_version(&sspi_major, &sspi_minor, &sspi_build, NULL))
- size = snprintf(buffer, size, "WinSSPI/%d.%d.%d", sspi_major, sspi_minor,
- sspi_build);
- else
- size = snprintf(buffer, size, "WinSSPI/unknown");
+ size = snprintf(buffer, size, "schannel");
return size;
}
#endif /* USE_SCHANNEL */
-#endif /* USE_WINDOWS_SSPI */
diff --git a/lib/curl_schannel.h b/lib/curl_schannel.h
index fa19a02de..bac6e422b 100644
--- a/lib/curl_schannel.h
+++ b/lib/curl_schannel.h
@@ -1,5 +1,5 @@
-#ifndef HEADER_SCHANNEL_H
-#define HEADER_SCHANNEL_H
+#ifndef HEADER_CURL_SCHANNEL_H
+#define HEADER_CURL_SCHANNEL_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -8,6 +8,7 @@
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2012, Marc Hoersken, <info@marc-hoersken.de>, et al.
+ * Copyright (C) 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -23,7 +24,6 @@
***************************************************************************/
#include "setup.h"
-#ifdef USE_WINDOWS_SSPI
#ifdef USE_SCHANNEL
#include "urldata.h"
@@ -129,5 +129,4 @@ size_t Curl_schannel_version(char *buffer, size_t size);
#define curlssl_data_pending Curl_schannel_data_pending
#endif /* USE_SCHANNEL */
-#endif /* USE_WINDOWS_SSPI */
-#endif /* HEADER_SCHANNEL_H */
+#endif /* HEADER_CURL_SCHANNEL_H */
diff --git a/lib/curl_sspi.c b/lib/curl_sspi.c
index 0d3feb642..cb83809b3 100644
--- a/lib/curl_sspi.c
+++ b/lib/curl_sspi.c
@@ -112,67 +112,4 @@ void Curl_sspi_global_cleanup(void)
}
}
-/*
- * Curl_sspi_version()
- *
- * This function returns the SSPI library version information.
- */
-CURLcode Curl_sspi_version(int *major, int *minor, int *build, int *special)
-{
- CURLcode result = CURLE_OK;
- VS_FIXEDFILEINFO *version_info = NULL;
- LPTSTR path = NULL;
- LPVOID data = NULL;
- DWORD size, handle;
- UINT length;
-
- if(!s_hSecDll)
- return CURLE_FAILED_INIT;
-
- path = (char *) malloc(MAX_PATH);
- if(!path)
- return CURLE_OUT_OF_MEMORY;
-
- if(GetModuleFileName(s_hSecDll, path, MAX_PATH)) {
- size = GetFileVersionInfoSize(path, &handle);
- if(size) {
- data = malloc(size);
- if(data) {
- if(GetFileVersionInfo(path, handle, size, data)) {
- if(!VerQueryValue(data, "\\", (LPVOID*) &version_info, &length))
- result = CURLE_OUT_OF_MEMORY;
- }
- else
- result = CURLE_OUT_OF_MEMORY;
- }
- else
- result = CURLE_OUT_OF_MEMORY;
- }
- else
- result = CURLE_OUT_OF_MEMORY;
- }
- else
- result = CURLE_OUT_OF_MEMORY;
-
- /* Set the out parameters */
- if(!result) {
- if(major)
- *major = (version_info->dwProductVersionMS >> 16) & 0xffff;
-
- if(minor)
- *minor = (version_info->dwProductVersionMS >> 0) & 0xffff;
-
- if(build)
- *build = (version_info->dwProductVersionLS >> 16) & 0xffff;
-
- if(special)
- *special = (version_info->dwProductVersionLS >> 0) & 0xffff;
- }
-
- Curl_safefree(data);
- Curl_safefree(path);
-
- return result;
-}
-
#endif /* USE_WINDOWS_SSPI */
diff --git a/lib/curl_sspi.h b/lib/curl_sspi.h
index 7e8880346..4e7d4cfe6 100644
--- a/lib/curl_sspi.h
+++ b/lib/curl_sspi.h
@@ -42,7 +42,6 @@
CURLcode Curl_sspi_global_init(void);
void Curl_sspi_global_cleanup(void);
-CURLcode Curl_sspi_version(int *major, int *minor, int *build, int *special);
/* Forward-declaration of global variables defined in curl_sspi.c */
diff --git a/lib/version.c b/lib/version.c
index 9f9fc78b1..783732403 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -67,11 +67,6 @@ char *curl_version(void)
char *ptr = version;
size_t len;
size_t left = sizeof(version);
-#ifdef USE_WINDOWS_SSPI
-#ifndef USE_SCHANNEL
- int sspi_major = 0, sspi_minor = 0, sspi_build = 0;
-#endif
-#endif
strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION);
len = strlen(ptr);
@@ -88,19 +83,6 @@ char *curl_version(void)
}
}
-#ifdef USE_WINDOWS_SSPI
-#ifndef USE_SCHANNEL
- if(CURLE_OK == Curl_sspi_version(&sspi_major, &sspi_minor, &sspi_build,
- NULL))
- len = snprintf(ptr, left, " WinSSPI/%d.%d.%d", sspi_major, sspi_minor,
- sspi_build);
- else
- len = snprintf(ptr, left, " WinSSPI/unknown");
-
- left -= len;
- ptr += len;
-#endif
-#endif
#ifdef HAVE_LIBZ
len = snprintf(ptr, left, " zlib/%s", zlibVersion());
left -= len;
diff --git a/src/Makefile.m32 b/src/Makefile.m32
index 2186326b6..e74a4188d 100644
--- a/src/Makefile.m32
+++ b/src/Makefile.m32
@@ -194,7 +194,6 @@ ifdef METALINK
endif
ifdef SSPI
CFLAGS += -DUSE_WINDOWS_SSPI
- curl_LDADD += -lversion
ifdef SCHANNEL
CFLAGS += -DUSE_SCHANNEL
endif
diff --git a/src/Makefile.vc6 b/src/Makefile.vc6
index 6da0877b9..a939d1514 100644
--- a/src/Makefile.vc6
+++ b/src/Makefile.vc6
@@ -101,8 +101,6 @@ SSL_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32"
SSL_IMP_LFLAGS = /LIBPATH:"$(OPENSSL_PATH)/out32dll"
SSL_LIBS = libeay32.lib ssleay32.lib gdi32.lib user32.lib advapi32.lib
-WINLIBS = ws2_32.lib wldap32.lib
-
# Runtime library configuration
RTLIB = /MD
RTLIBD = /MDd
@@ -229,9 +227,6 @@ DEBUG_OBJS= \
CFLAGS = $(CFLAGS) /DCURL_STATICLIB
LINKLIBS = $(LIBCURL_STA_LIB_REL)
LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG)
-!IFDEF WINDOWS_SSPI
-WINLIBS = $(WINLIBS) version.lib
-!ENDIF
#################################################
# release dynamic library
@@ -249,9 +244,6 @@ CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_LIBS)
LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_LIBS)
LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
-!IFDEF WINDOWS_SSPI
-WINLIBS = $(WINLIBS) version.lib
-!ENDIF
!ENDIF
#################################################
@@ -262,9 +254,6 @@ CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB
LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS)
LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS)
LFLAGS = $(LFLAGS) $(SSL_LFLAGS)
-!IFDEF WINDOWS_SSPI
-WINLIBS = $(WINLIBS) version.lib
-!ENDIF
!ENDIF
#################################################
@@ -285,9 +274,6 @@ CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_LIBS)
LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_LIBS)
LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(ZLIB_LFLAGS)
-!IFDEF WINDOWS_SSPI
-WINLIBS = $(WINLIBS) version.lib
-!ENDIF
!ENDIF
#################################################
@@ -298,9 +284,6 @@ CFLAGS = $(CFLAGS) $(SSL_CFLAGS) /DCURL_STATICLIB
LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS)
LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS)
LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS)
-!IFDEF WINDOWS_SSPI
-WINLIBS = $(WINLIBS) version.lib
-!ENDIF
!ENDIF
#################################################
@@ -311,9 +294,6 @@ CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
LINKLIBS = $(LIBCURL_STA_LIB_REL) $(ZLIB_IMP_LIBS)
LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(ZLIB_IMP_LIBS)
LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS)
-!IFDEF WINDOWS_SSPI
-WINLIBS = $(WINLIBS) version.lib
-!ENDIF
!ENDIF
#################################################
@@ -334,9 +314,6 @@ CFLAGS = $(CFLAGS) $(SSL_CFLAGS) $(ZLIB_CFLAGS) /DCURL_STATICLIB
LINKLIBS = $(LIBCURL_STA_LIB_REL) $(SSL_LIBS) $(ZLIB_IMP_LIBS)
LINKLIBS_DEBUG = $(LIBCURL_STA_LIB_DBG) $(SSL_LIBS) $(ZLIB_IMP_LIBS)
LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
-!IFDEF WINDOWS_SSPI
-WINLIBS = $(WINLIBS) version.lib
-!ENDIF
!ENDIF
#################################################
@@ -350,8 +327,8 @@ LFLAGS = $(LFLAGS) $(SSL_IMP_LFLAGS) $(ZLIB_LFLAGS)
!ENDIF
-LINKLIBS = $(LINKLIBS) $(WINLIBS)
-LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) $(WINLIBS)
+LINKLIBS = $(LINKLIBS) ws2_32.lib wldap32.lib
+LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) ws2_32.lib wldap32.lib
all : release
diff --git a/winbuild/MakefileBuild.vc b/winbuild/MakefileBuild.vc
index 7063906d7..9569ed9e7 100644
--- a/winbuild/MakefileBuild.vc
+++ b/winbuild/MakefileBuild.vc
@@ -143,17 +143,19 @@ SSH2_CFLAGS = $(SSH2_CFLAGS) /I$(WITH_DEVEL)/include/libssh2
!ENDIF
+!IFNDEF USE_SSL
+CFLAGS_SSPI = /DUSE_SCHANNEL
+USE_SCHANNEL = true
+USE_SSPI = yes
+!ENDIF
+
!IFNDEF USE_SSPI
USE_SSPI = yes
!ENDIF
!IF "$(USE_SSPI)"=="yes"
-CFLAGS_SSPI = /DUSE_WINDOWS_SSPI
-LFLAGS_SSPI = version.lib
+CFLAGS_SSPI = $(CFLAGS_SSPI) /DUSE_WINDOWS_SSPI
USE_SSPI = true
-!IFNDEF USE_SSL
-CFLAGS_SSPI = $(CFLAGS_SSPI) /DUSE_SCHANNEL
-!ENDIF
!ENDIF
@@ -296,9 +298,12 @@ CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ipv6
!IF "$(USE_SSPI)"=="true"
CFLAGS = $(CFLAGS) $(CFLAGS_SSPI)
-LFLAGS = $(LFLAGS) $(LFLAGS_SSPI)
+!IF "$(USE_SCHANNEL)"=="true"
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-sspi-schannel
+!ELSE
CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-sspi
!ENDIF
+!ENDIF
!IF "$(GEN_PDB)"=="true"
CFLAGS = $(CFLAGS) $(CFLAGS_PDB)