]> git.ipfire.org Git - thirdparty/squid.git/blame - lib/sspi/sspwin32.h
Update libsspwin32 (#1348)
[thirdparty/squid.git] / lib / sspi / sspwin32.h
CommitLineData
5c193dec 1/*
b8ae064d 2 * Copyright (C) 1996-2023 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
6e785d85 17#define SECURITY_WIN32
18#define NTLM_PACKAGE_NAME "NTLM"
19#define NEGOTIATE_PACKAGE_NAME "Negotiate"
20
b9ce9676 21#if HAVE_TCHAR_H
6e785d85 22#include <tchar.h>
23#endif
b9ce9676 24#if HAVE_WINDOWS_H
6e785d85 25#include <windows.h>
b9ce9676
AJ
26#endif
27#if HAVE_NTSECAPI_H
b16858f4 28#include <ntsecapi.h>
b9ce9676
AJ
29#endif
30#if HAVE_SECURITY_H
6e785d85 31#include <security.h>
b9ce9676
AJ
32#endif
33#if HAVE_SSPI_H
6e785d85 34#include <sspi.h>
b9ce9676 35#endif
6e785d85 36
f53969cc 37typedef char * SSP_blobP;
6e785d85 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
f53969cc
SM
52HMODULE LoadSecurityDll(int, const char *);
53void UnloadSecurityDll(void);
b9ce9676
AJ
54
55#if HAVE_AUTH_MODULE_BASIC
f53969cc 56BOOL WINAPI SSP_LogonUser(PTSTR, PTSTR, PTSTR);
b9ce9676 57#endif
6e785d85 58
b9ce9676
AJ
59#if HAVE_AUTH_MODULE_NTLM
60const char * WINAPI SSP_MakeChallenge(PVOID, int);
61BOOL WINAPI SSP_ValidateNTLMCredentials(PVOID, int, char *);
f53969cc 62extern BOOL NTLM_LocalCall;
b9ce9676 63#endif
e1f7507e 64
b9ce9676
AJ
65#if HAVE_AUTH_MODULE_NEGOTIATE
66const char * WINAPI SSP_MakeNegotiateBlob(PVOID, int, PBOOL, int *, char *);
67const char * WINAPI SSP_ValidateNegotiateCredentials(PVOID, int, PBOOL, int *, char *);
ccc7f049 68#endif
d6054896 69
6e785d85 70#endif /* LIBSSPWIN32_H_ */
f53969cc 71