FreeRDP
Loading...
Searching...
No Matches
libwinpr/sspi/sspi.h
1
20#ifndef WINPR_SSPI_PRIVATE_H
21#define WINPR_SSPI_PRIVATE_H
22
23#include <winpr/sspi.h>
24
25/* Macro converting a ANSII character to a little endian WCHAR */
26#if defined(__BIG_ENDIAN__)
27#define W(c) (((WCHAR)(char)c) << 8)
28#else
29#define W(c) (((WCHAR)(char)c))
30#endif
31
32#define SCHANNEL_CB_MAX_TOKEN 0x00006000
33
34typedef struct
35{
36 DWORD flags;
37 ULONG fCredentialUse;
38 SEC_GET_KEY_FN pGetKeyFn;
39 void* pvGetKeyArgument;
40 SEC_WINNT_AUTH_IDENTITY identity;
41 SEC_WINPR_NTLM_SETTINGS ntlmSettings;
42 SEC_WINPR_KERBEROS_SETTINGS kerbSettings;
44
45SSPI_CREDENTIALS* sspi_CredentialsNew(void);
46void sspi_CredentialsFree(SSPI_CREDENTIALS* credentials);
47
48PSecBuffer sspi_FindSecBuffer(PSecBufferDesc pMessage, ULONG BufferType);
49
50SecHandle* sspi_SecureHandleAlloc(void);
51void sspi_SecureHandleInvalidate(SecHandle* handle);
52void* sspi_SecureHandleGetLowerPointer(SecHandle* handle);
53void sspi_SecureHandleSetLowerPointer(SecHandle* handle, void* pointer);
54void* sspi_SecureHandleGetUpperPointer(SecHandle* handle);
55void sspi_SecureHandleSetUpperPointer(SecHandle* handle, void* pointer);
56void sspi_SecureHandleFree(SecHandle* handle);
57
58enum SecurityFunctionTableIndex
59{
60 EnumerateSecurityPackagesIndex = 1,
61 Reserved1Index = 2,
62 QueryCredentialsAttributesIndex = 3,
63 AcquireCredentialsHandleIndex = 4,
64 FreeCredentialsHandleIndex = 5,
65 Reserved2Index = 6,
66 InitializeSecurityContextIndex = 7,
67 AcceptSecurityContextIndex = 8,
68 CompleteAuthTokenIndex = 9,
69 DeleteSecurityContextIndex = 10,
70 ApplyControlTokenIndex = 11,
71 QueryContextAttributesIndex = 12,
72 ImpersonateSecurityContextIndex = 13,
73 RevertSecurityContextIndex = 14,
74 MakeSignatureIndex = 15,
75 VerifySignatureIndex = 16,
76 FreeContextBufferIndex = 17,
77 QuerySecurityPackageInfoIndex = 18,
78 Reserved3Index = 19,
79 Reserved4Index = 20,
80 ExportSecurityContextIndex = 21,
81 ImportSecurityContextIndex = 22,
82 AddCredentialsIndex = 23,
83 Reserved8Index = 24,
84 QuerySecurityContextTokenIndex = 25,
85 EncryptMessageIndex = 26,
86 DecryptMessageIndex = 27,
87 SetContextAttributesIndex = 28,
88 SetCredentialsAttributesIndex = 29
89};
90
91BOOL IsSecurityStatusError(SECURITY_STATUS status);
92
93#include "sspi_gss.h"
94#include "sspi_winpr.h"
95
96#endif /* WINPR_SSPI_PRIVATE_H */