]> git.ipfire.org Git - thirdparty/squid.git/blob - lib/sspi/sspwin32.h
Update libsspwin32 (#1348)
[thirdparty/squid.git] / lib / sspi / sspwin32.h
1 /*
2 * Copyright (C) 1996-2023 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 #define SECURITY_WIN32
18 #define NTLM_PACKAGE_NAME "NTLM"
19 #define NEGOTIATE_PACKAGE_NAME "Negotiate"
20
21 #if HAVE_TCHAR_H
22 #include <tchar.h>
23 #endif
24 #if HAVE_WINDOWS_H
25 #include <windows.h>
26 #endif
27 #if HAVE_NTSECAPI_H
28 #include <ntsecapi.h>
29 #endif
30 #if HAVE_SECURITY_H
31 #include <security.h>
32 #endif
33 #if HAVE_SSPI_H
34 #include <sspi.h>
35 #endif
36
37 typedef char * SSP_blobP;
38
39 #define WINNT_SECURITY_DLL "security.dll"
40 #define WIN2K_SECURITY_DLL "secur32.dll"
41
42 #define SSP_BASIC 1
43 #define SSP_NTLM 2
44
45 #define SSP_MAX_CRED_LEN 848
46
47 #define SSP_DEBUG 0
48
49 #define SSP_OK 1
50 #define SSP_ERROR 2
51
52 HMODULE LoadSecurityDll(int, const char *);
53 void UnloadSecurityDll(void);
54
55 #if HAVE_AUTH_MODULE_BASIC
56 BOOL WINAPI SSP_LogonUser(PTSTR, PTSTR, PTSTR);
57 #endif
58
59 #if HAVE_AUTH_MODULE_NTLM
60 const char * WINAPI SSP_MakeChallenge(PVOID, int);
61 BOOL WINAPI SSP_ValidateNTLMCredentials(PVOID, int, char *);
62 extern BOOL NTLM_LocalCall;
63 #endif
64
65 #if HAVE_AUTH_MODULE_NEGOTIATE
66 const char * WINAPI SSP_MakeNegotiateBlob(PVOID, int, PBOOL, int *, char *);
67 const char * WINAPI SSP_ValidateNegotiateCredentials(PVOID, int, PBOOL, int *, char *);
68 #endif
69
70 #endif /* LIBSSPWIN32_H_ */
71