]>
Commit | Line | Data |
---|---|---|
5c193dec | 1 | /* |
5b74111a | 2 | * Copyright (C) 1996-2018 The Squid Software Foundation and contributors |
5c193dec AJ |
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 | ||
6e785d85 | 9 | /* |
1b52df9a | 10 | * AUTHOR: Guido Serassio <serassio@squid-cache.org> |
6e785d85 | 11 | * Based on previous work of Francesco Chemolli, Robert Collins and Andrew Doran |
6e785d85 | 12 | */ |
5c193dec | 13 | |
6e785d85 | 14 | #ifndef _LIBSSPWIN32_H_ |
15 | #define _LIBSSPWIN32_H_ | |
e1f7507e | 16 | |
d6054896 AJ |
17 | #if _SQUID_WINDOWS_ |
18 | ||
19 | #if defined(__cplusplus) | |
ccc7f049 AJ |
20 | extern "C" { |
21 | #endif | |
22 | ||
6e785d85 | 23 | #define SECURITY_WIN32 |
24 | #define NTLM_PACKAGE_NAME "NTLM" | |
25 | #define NEGOTIATE_PACKAGE_NAME "Negotiate" | |
26 | ||
be266cb2 | 27 | #if _SQUID_CYGWIN_ |
6e785d85 | 28 | #include <wchar.h> |
29 | #define _T(x) TEXT(x) | |
30 | #else | |
31 | #include <tchar.h> | |
32 | #endif | |
33 | #include <windows.h> | |
b16858f4 | 34 | #include <ntsecapi.h> |
6e785d85 | 35 | #include <security.h> |
36 | #include <sspi.h> | |
37 | ||
f53969cc | 38 | typedef char * SSP_blobP; |
6e785d85 | 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 | ||
f53969cc SM |
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 *); | |
6e785d85 | 60 | |
f53969cc SM |
61 | extern BOOL Use_Unicode; |
62 | extern BOOL NTLM_LocalCall; | |
e1f7507e | 63 | |
d6054896 | 64 | #if defined(__cplusplus) |
ccc7f049 AJ |
65 | } |
66 | #endif | |
d6054896 | 67 | |
be266cb2 | 68 | #endif /* _SQUID_WINDOWS_ */ |
6e785d85 | 69 | #endif /* LIBSSPWIN32_H_ */ |
f53969cc | 70 |