cURL / Mailing Lists / curl-library / Single Mail


SSPI on WinNT 4

From: Dmitry Bartsevich <>
Date: Tue, 8 Nov 2005 15:11:32 +0200

I've discovered some issues in compatibilty of SSPI-enabled version
of libcurl with different Windows versions. Current version of libcurl
imports SSPI functions from secur32.dll. However, under Windows NT 4.0
these functions are located in security.dll, under Windows 9x - in
secur32.dll and Windows 2000 and XP contains both these DLLs
(security.dll just forwards calls to secur32.dll).

Patch attached to this message loads proper library dynamically
depending on Windows version. Function InitSecurityInterface() is used
to obtain pointers to all of SSPI function in one structure -

2 static variables was added to module http_ntlm.c:

HMODULE s_hSecDll - handle of security library.
PSecurityFunctionTable s_pSecFn - pointer to security functions table.

Security interface is initialized in Curl_output_ntlm() and security
library is unloaded in Curl_ntlm_cleanup().

Configure scripts and makefiles are corrected not to link with

Best regards,

Received on 2005-11-08