20#ifndef WINPR_SSPI_PRIVATE_H
21#define WINPR_SSPI_PRIVATE_H
23#include <winpr/sspi.h>
26#if defined(__BIG_ENDIAN__)
27#define W(c) (((WCHAR)(char)c) << 8)
29#define W(c) (((WCHAR)(char)c))
32#define SCHANNEL_CB_MAX_TOKEN 0x00006000
38 SEC_GET_KEY_FN pGetKeyFn;
39 void* pvGetKeyArgument;
40 SEC_WINNT_AUTH_IDENTITY identity;
41 SEC_WINPR_NTLM_SETTINGS_V2* ntlmSettingsV2;
46WINPR_ATTR_MALLOC(sspi_CredentialsFree, 1)
51void sspi_SecureHandleFree(
SecHandle* handle);
53WINPR_ATTR_MALLOC(sspi_SecureHandleFree, 1)
56void sspi_SecureHandleInvalidate(
SecHandle* handle);
59void* sspi_SecureHandleGetLowerPointer(
SecHandle* handle);
61void sspi_SecureHandleSetLowerPointer(
SecHandle* handle,
void* pointer);
64void* sspi_SecureHandleGetUpperPointer(
SecHandle* handle);
66void sspi_SecureHandleSetUpperPointer(
SecHandle* handle,
void* pointer);
71typedef enum WINPR_C23_ENUM_TYPE(uint32_t)
73 SSPI_PACKAGE_NONE = 0,
74 SSPI_PACKAGE_NTLM = 1,
75 SSPI_PACKAGE_KERBEROS = 2,
76 SSPI_PACKAGE_NEGOTIATE = 3,
77 SSPI_PACKAGE_CREDSSP = 4,
78 SSPI_PACKAGE_SCHANNEL = 5,
85WINPR_ATTR_NODISCARD SSPI_PACKAGE_ID sspi_SecureHandleGetPackageId(
SecHandle* handle);
86void sspi_SecureHandleSetPackageId(
SecHandle* handle, SSPI_PACKAGE_ID
id);
88enum SecurityFunctionTableIndex
90 EnumerateSecurityPackagesIndex = 1,
92 QueryCredentialsAttributesIndex = 3,
93 AcquireCredentialsHandleIndex = 4,
94 FreeCredentialsHandleIndex = 5,
96 InitializeSecurityContextIndex = 7,
97 AcceptSecurityContextIndex = 8,
98 CompleteAuthTokenIndex = 9,
99 DeleteSecurityContextIndex = 10,
100 ApplyControlTokenIndex = 11,
101 QueryContextAttributesIndex = 12,
102 ImpersonateSecurityContextIndex = 13,
103 RevertSecurityContextIndex = 14,
104 MakeSignatureIndex = 15,
105 VerifySignatureIndex = 16,
106 FreeContextBufferIndex = 17,
107 QuerySecurityPackageInfoIndex = 18,
110 ExportSecurityContextIndex = 21,
111 ImportSecurityContextIndex = 22,
112 AddCredentialsIndex = 23,
114 QuerySecurityContextTokenIndex = 25,
115 EncryptMessageIndex = 26,
116 DecryptMessageIndex = 27,
117 SetContextAttributesIndex = 28,
118 SetCredentialsAttributesIndex = 29
122BOOL IsSecurityStatusError(SECURITY_STATUS status);
125#include "sspi_winpr.h"