sspwin32.h
Go to the documentation of this file.
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#if _SQUID_WINDOWS_
18
19#if defined(__cplusplus)
20extern "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
38typedef 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
53HMODULE LoadSecurityDll(int, const char *);
54void UnloadSecurityDll(void);
55BOOL WINAPI SSP_LogonUser(PTSTR, PTSTR, PTSTR);
56BOOL WINAPI SSP_ValidateNTLMCredentials(PVOID, int, char *);
57const char * WINAPI SSP_ValidateNegotiateCredentials(PVOID, int, PBOOL, int *, char *);
58const char * WINAPI SSP_MakeChallenge(PVOID, int);
59const char * WINAPI SSP_MakeNegotiateBlob(PVOID, int, PBOOL, int *, char *);
60
61extern BOOL Use_Unicode;
62extern BOOL NTLM_LocalCall;
63
64#if defined(__cplusplus)
65}
66#endif
67
68#endif /* _SQUID_WINDOWS_ */
69#endif /* LIBSSPWIN32_H_ */
70
const char *WINAPI SSP_MakeChallenge(PVOID PNegotiateBuf, int NegotiateLen)
Definition: sspwin32.cc:458
BOOL WINAPI SSP_ValidateNTLMCredentials(PVOID PAutenticateBuf, int AutenticateLen, char *credentials)
Definition: sspwin32.cc:505
BOOL Use_Unicode
Definition: sspwin32.cc:39
const char *WINAPI SSP_MakeNegotiateBlob(PVOID PNegotiateBuf, int NegotiateLen, PBOOL fDone, int *Status, char *credentials)
Definition: sspwin32.cc:530
const char *WINAPI SSP_ValidateNegotiateCredentials(PVOID PAutenticateBuf, int AutenticateLen, PBOOL fDone, int *Status, char *credentials)
Definition: sspwin32.cc:571
BOOL NTLM_LocalCall
Definition: sspwin32.cc:40
void UnloadSecurityDll(void)
Definition: sspwin32.cc:57
HMODULE LoadSecurityDll(int mode, const char *SSP_Package)
Definition: sspwin32.cc:84
BOOL WINAPI SSP_LogonUser(PTSTR szUser, PTSTR szPassword, PTSTR szDomain)
Definition: sspwin32.cc:383
#define BOOL
Definition: std-includes.h:38

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors