]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * Copyright (C) 1996-2017 The Squid Software Foundation and contributors | |
3 | * | |
4 | * Squid software is distributed under GPLv2+ license and includes | |
5 | * contributions from numerous individuals and organizations. | |
6 | * Please see the COPYING and CONTRIBUTORS files for details. | |
7 | */ | |
8 | ||
9 | /* | |
10 | * AUTHOR: Guido Serassio <serassio@squid-cache.org> | |
11 | * Based on previous work of Francesco Chemolli, Robert Collins and Andrew Doran | |
12 | */ | |
13 | ||
14 | #ifndef _LIBSSPWIN32_H_ | |
15 | #define _LIBSSPWIN32_H_ | |
16 | ||
17 | #if _SQUID_WINDOWS_ | |
18 | ||
19 | #if defined(__cplusplus) | |
20 | extern "C" { | |
21 | #endif | |
22 | ||
23 | #define SECURITY_WIN32 | |
24 | #define NTLM_PACKAGE_NAME "NTLM" | |
25 | #define NEGOTIATE_PACKAGE_NAME "Negotiate" | |
26 | ||
27 | #if _SQUID_CYGWIN_ | |
28 | #include <wchar.h> | |
29 | #define _T(x) TEXT(x) | |
30 | #else | |
31 | #include <tchar.h> | |
32 | #endif | |
33 | #include <windows.h> | |
34 | #include <ntsecapi.h> | |
35 | #include <security.h> | |
36 | #include <sspi.h> | |
37 | ||
38 | typedef char * SSP_blobP; | |
39 | ||
40 | #define WINNT_SECURITY_DLL "security.dll" | |
41 | #define WIN2K_SECURITY_DLL "secur32.dll" | |
42 | ||
43 | #define SSP_BASIC 1 | |
44 | #define SSP_NTLM 2 | |
45 | ||
46 | #define SSP_MAX_CRED_LEN 848 | |
47 | ||
48 | #define SSP_DEBUG 0 | |
49 | ||
50 | #define SSP_OK 1 | |
51 | #define SSP_ERROR 2 | |
52 | ||
53 | HMODULE LoadSecurityDll(int, const char *); | |
54 | void UnloadSecurityDll(void); | |
55 | BOOL WINAPI SSP_LogonUser(PTSTR, PTSTR, PTSTR); | |
56 | BOOL WINAPI SSP_ValidateNTLMCredentials(PVOID, int, char *); | |
57 | const char * WINAPI SSP_ValidateNegotiateCredentials(PVOID, int, PBOOL, int *, char *); | |
58 | const char * WINAPI SSP_MakeChallenge(PVOID, int); | |
59 | const char * WINAPI SSP_MakeNegotiateBlob(PVOID, int, PBOOL, int *, char *); | |
60 | ||
61 | extern BOOL Use_Unicode; | |
62 | extern BOOL NTLM_LocalCall; | |
63 | ||
64 | #if defined(__cplusplus) | |
65 | } | |
66 | #endif | |
67 | ||
68 | #endif /* _SQUID_WINDOWS_ */ | |
69 | #endif /* LIBSSPWIN32_H_ */ | |
70 |