File: sspwin32.h

package info (click to toggle)
squid 7.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,440 kB
  • sloc: cpp: 184,513; ansic: 12,442; sh: 5,688; makefile: 5,247; perl: 2,560; sql: 326; python: 240; awk: 141; sed: 1
file content (71 lines) | stat: -rw-r--r-- 1,633 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
 * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
 *
 * Squid software is distributed under GPLv2+ license and includes
 * contributions from numerous individuals and organizations.
 * Please see the COPYING and CONTRIBUTORS files for details.
 */

/*
 * AUTHOR: Guido Serassio <serassio@squid-cache.org>
 * Based on previous work of Francesco Chemolli, Robert Collins and Andrew Doran
 */

#ifndef SQUID_LIB_SSPI_SSPWIN32_H
#define SQUID_LIB_SSPI_SSPWIN32_H

#define SECURITY_WIN32
#define NTLM_PACKAGE_NAME "NTLM"
#define NEGOTIATE_PACKAGE_NAME "Negotiate"

#if HAVE_TCHAR_H
#include <tchar.h>
#endif
#if HAVE_WINDOWS_H
#include <windows.h>
#endif
#if HAVE_NTSECAPI_H
#include <ntsecapi.h>
#endif
#if HAVE_SECURITY_H
#include <security.h>
#endif
#if HAVE_SSPI_H
#include <sspi.h>
#endif

typedef char * SSP_blobP;

#define WINNT_SECURITY_DLL "security.dll"
#define WIN2K_SECURITY_DLL "secur32.dll"

#define SSP_BASIC 1
#define SSP_NTLM 2

#define SSP_MAX_CRED_LEN 848

#define SSP_DEBUG 0

#define SSP_OK 1
#define SSP_ERROR 2

HMODULE LoadSecurityDll(int, const char *);
void UnloadSecurityDll(void);

#if HAVE_AUTH_MODULE_BASIC
BOOL WINAPI SSP_LogonUser(PTSTR, PTSTR, PTSTR);
#endif

#if HAVE_AUTH_MODULE_NTLM
const char * WINAPI SSP_MakeChallenge(PVOID, int);
BOOL WINAPI SSP_ValidateNTLMCredentials(PVOID, int, char *);
extern BOOL NTLM_LocalCall;
#endif

#if HAVE_AUTH_MODULE_NEGOTIATE
const char * WINAPI SSP_MakeNegotiateBlob(PVOID, int, PBOOL, int *, char *);
const char * WINAPI SSP_ValidateNegotiateCredentials(PVOID, int, PBOOL, int *, char *);
#endif

#endif /* SQUID_LIB_SSPI_SSPWIN32_H */