aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-04-23 16:28:01 +0200
committerYang Tse <yangsita@gmail.com>2012-04-23 16:28:01 +0200
commitd6c449e3b4262aa29c1594d64379a8c26d9a5c38 (patch)
tree020e22930ac9dfc4c926fbe43f6fd880ad962e11 /lib
parent071f8d4182ec86b236404e0af3dadfd0bf3270c8 (diff)
Revert "sspi: Added version information"
This reverts commit 2976de480808119dae08fc6f52c8d75ba1aedb1a.
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.m321
-rw-r--r--lib/Makefile.vc61
-rw-r--r--lib/curl_sspi.c64
-rw-r--r--lib/curl_sspi.h3
-rw-r--r--lib/version.c26
5 files changed, 8 insertions, 87 deletions
diff --git a/lib/Makefile.m32 b/lib/Makefile.m32
index 6f27742a1..adb5e5fe4 100644
--- a/lib/Makefile.m32
+++ b/lib/Makefile.m32
@@ -169,7 +169,6 @@ endif
endif
ifdef SSPI
CFLAGS += -DUSE_WINDOWS_SSPI
- DLL_LIBS += -lversion
endif
ifdef SPNEGO
CFLAGS += -DHAVE_SPNEGO
diff --git a/lib/Makefile.vc6 b/lib/Makefile.vc6
index b6b4d683a..e69f31a15 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_sspi.c b/lib/curl_sspi.c
index e065f86c5..b985dbceb 100644
--- a/lib/curl_sspi.c
+++ b/lib/curl_sspi.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2009, 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
@@ -101,68 +101,6 @@ Curl_sspi_global_init(void)
return CURLE_OK;
}
-/*
- * 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 version = NULL;
- LPTSTR path = NULL;
- LPVOID data = NULL;
- DWORD size, handle;
-
- if(!s_hSecDll)
- return CURLE_FAILED_INIT;
-
- path = 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, "\\", &version_info, &handle))
- 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;
-}
/*
* Curl_sspi_global_cleanup()
diff --git a/lib/curl_sspi.h b/lib/curl_sspi.h
index 80e0b67a7..c0e4f368f 100644
--- a/lib/curl_sspi.h
+++ b/lib/curl_sspi.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2010, 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
@@ -62,7 +62,6 @@
#endif
CURLcode Curl_sspi_global_init(void);
-CURLcode Curl_sspi_version(int *major, int *minor, int *build, int *special);
void Curl_sspi_global_cleanup(void);
/* Forward-declaration of global variables defined in curl_sspi.c */
diff --git a/lib/version.c b/lib/version.c
index 38da9f14d..c56ad3962 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
@@ -64,16 +64,10 @@
char *curl_version(void)
{
static char version[200];
- char *ptr = version;
+ char *ptr=version;
size_t len;
size_t left = sizeof(version);
-#ifdef USE_WINDOWS_SSPI
- int sspi_major = 0;
- int sspi_minor = 0;
- int sspi_build = 0;
-#endif;
-
- strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION);
+ strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION );
len = strlen(ptr);
left -= len;
ptr += len;
@@ -88,17 +82,6 @@ char *curl_version(void)
}
}
-#ifdef USE_WINDOWS_SSPI
- if(CURLE_OK == Curl_sspi_version(&sspi_major, &sspi_minor, &sspi_build,
- NULL))
- len = snprintf(ptr, left, " sspi/%d.%d.%d", sspi_major, sspi_minor,
- sspi_build);
- else
- len = snprintf(ptr, left, " sspi/unknown");
-
- left -= len;
- ptr += len;
-#endif
#ifdef HAVE_LIBZ
len = snprintf(ptr, left, " zlib/%s", zlibVersion());
left -= len;
@@ -260,6 +243,9 @@ static curl_version_info_data version_info = {
#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED)
| CURL_VERSION_NTLM_WB
#endif
+#ifdef USE_WINDOWS_SSPI
+ | CURL_VERSION_SSPI
+#endif
#ifdef HAVE_LIBZ
| CURL_VERSION_LIBZ
#endif