]> granicus.if.org Git - curl/commitdiff
Revert "sspi: Added version information"
authorYang Tse <yangsita@gmail.com>
Mon, 23 Apr 2012 14:28:01 +0000 (16:28 +0200)
committerYang Tse <yangsita@gmail.com>
Mon, 23 Apr 2012 14:28:01 +0000 (16:28 +0200)
This reverts commit 2976de480808119dae08fc6f52c8d75ba1aedb1a.

lib/Makefile.m32
lib/Makefile.vc6
lib/curl_sspi.c
lib/curl_sspi.h
lib/version.c
src/Makefile.m32
src/tool_getparam.c
winbuild/MakefileBuild.vc

index 6f27742a19163ba9042e9616bb077dbab1478fe4..adb5e5fe433e06f8ae139584472e6126dca3218f 100644 (file)
@@ -169,7 +169,6 @@ endif
 endif
 ifdef SSPI
   CFLAGS += -DUSE_WINDOWS_SSPI
-  DLL_LIBS += -lversion
 endif
 ifdef SPNEGO
   CFLAGS += -DHAVE_SPNEGO
index b6b4d683acc2cc64b1fee32654d2171238043e9c..e69f31a1501fb6bf4a31726985fb2421d44be0e3 100644 (file)
@@ -123,7 +123,6 @@ CFGSET     = FALSE
 \r
 !IFDEF WINDOWS_SSPI\r
 CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include\r
-WINLIBS = $(WINLIBS) version.lib\r
 !ENDIF\r
 \r
 !IFDEF USE_IPV6\r
index e065f86c58746aed6a100f12e3366ed1b3c39d7d..b985dbceb0a430c56924cae63cbaed52eb5b3239 100644 (file)
@@ -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()
index 80e0b67a710c510abec1b34df75cabfa58114595..c0e4f368f1071b9897c39c5e4c50bfe176f0f39d 100644 (file)
@@ -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 */
index 38da9f14d097224bbe16292c64647a5a8413db9e..c56ad39623528e9fc52391758fcc7ae069077750 100644 (file)
@@ -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
 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
index 69732e3c5cbb997b4c6531f4db42b0b744e00514..17c6116c8eb909f3e5fb238ec52c6cc350520944 100644 (file)
@@ -168,7 +168,6 @@ endif
 endif
 ifdef SSPI
   CFLAGS += -DUSE_WINDOWS_SSPI
-  curl_LDADD += -lversion
 endif
 ifdef SPNEGO
   CFLAGS += -DHAVE_SPNEGO
index 0245edac2515fa031f9b13fa67790f170e7ee756..5a24cc8a9313d9fe512bc0696195797bfb996344 100644 (file)
@@ -275,6 +275,7 @@ static const struct feat feats[] = {
   {"NTLM_WB",        CURL_VERSION_NTLM_WB},
   {"SPNEGO",         CURL_VERSION_SPNEGO},
   {"SSL",            CURL_VERSION_SSL},
+  {"SSPI",           CURL_VERSION_SSPI},
   {"krb4",           CURL_VERSION_KERBEROS4},
   {"libz",           CURL_VERSION_LIBZ},
   {"CharConv",       CURL_VERSION_CONV},
index 1a7850ad5e3964938b5eda65893d2ea56566ac09..238b3ea60f2dec21435c4c73fdf0925e3ee8dbf7 100644 (file)
@@ -145,7 +145,6 @@ USE_SSPI=yes
 
 !IF "$(USE_SSPI)"=="yes"
 CFLAGS_SSPI = /DUSE_WINDOWS_SSPI
-LFLAGS_SSPI = version.lib
 USE_SSPI=true
 !ENDIF
 
@@ -284,7 +283,6 @@ CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ipv6
 
 !IF "$(USE_SSPI)"=="true"
 CFLAGS = $(CFLAGS) $(CFLAGS_SSPI)
-LFLAGS = $(LFLAGS) $(LFLAGS_SSPI)
 CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-sspi
 !ENDIF