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