]> git.ipfire.org Git - thirdparty/squid.git/blob - include/sspwin32.h
Windows port: addition of native authentication helpers.
[thirdparty/squid.git] / include / sspwin32.h
1 /*
2 * (C) 2002 Guido Serassio <serassio@libero.it>
3 * Based on previous work of Francesco Chemolli, Robert Collins and Andrew Doran
4 *
5 * Distributed freely under the terms of the GNU General Public License,
6 * version 2. See the file COPYING for licensing details
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
16 */
17
18 #ifndef _LIBSSPWIN32_H_
19 #define _LIBSSPWIN32_H_
20 #define SECURITY_WIN32
21 #define NTLM_PACKAGE_NAME "NTLM"
22 #define NEGOTIATE_PACKAGE_NAME "Negotiate"
23
24 #ifdef _SQUID_CYGWIN_
25 #include <wchar.h>
26 #define _T(x) TEXT(x)
27 #else
28 #include <tchar.h>
29 #endif
30 #include <windows.h>
31 #include <security.h>
32 #include <sspi.h>
33
34 typedef char * SSP_blobP;
35
36 #define WINNT_SECURITY_DLL "security.dll"
37 #define WIN2K_SECURITY_DLL "secur32.dll"
38
39 #define SSP_BASIC 1
40 #define SSP_NTLM 2
41
42 #define SSP_MAX_CRED_LEN 848
43
44 #define SSP_DEBUG 0
45
46 #define SSP_OK 1
47 #define SSP_ERROR 2
48
49 HMODULE LoadSecurityDll(int, char *);
50 void UnloadSecurityDll(void);
51 BOOL WINAPI SSP_LogonUser(PTSTR, PTSTR, PTSTR);
52 BOOL WINAPI SSP_ValidateNTLMCredentials(PVOID, int, char *);
53 const char * WINAPI SSP_ValidateNegotiateCredentials(PVOID, int, PBOOL, int *, char *);
54 const char * WINAPI SSP_MakeChallenge(PVOID, int);
55 const char * WINAPI SSP_MakeNegotiateBlob(PVOID, int, PBOOL, int *, char *);
56
57 extern BOOL Use_Unicode;
58 extern BOOL NTLM_LocalCall;
59 #endif /* LIBSSPWIN32_H_ */