ReactOS 0.4.15-dev-7942-gd23573b
thunks.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

SECURITY_STATUS SEC_ENTRY thunk_AcquireCredentialsHandleA (SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialsUse, PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry) DECLSPEC_HIDDEN
 
SECURITY_STATUS SEC_ENTRY thunk_AcquireCredentialsHandleW (SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialsUse, PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry) DECLSPEC_HIDDEN
 
SECURITY_STATUS SEC_ENTRY thunk_InitializeSecurityContextA (PCredHandle phCredential, PCtxtHandle phContext, SEC_CHAR *pszTargetName, ULONG fContextReq, ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, ULONG *pfContextAttr, PTimeStamp ptsExpiry) DECLSPEC_HIDDEN
 
SECURITY_STATUS SEC_ENTRY thunk_InitializeSecurityContextW (PCredHandle phCredential, PCtxtHandle phContext, SEC_WCHAR *pszTargetName, ULONG fContextReq, ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, ULONG *pfContextAttr, PTimeStamp ptsExpiry) DECLSPEC_HIDDEN
 
SECURITY_STATUS SEC_ENTRY thunk_ImportSecurityContextA (SEC_CHAR *pszPackage, PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext) DECLSPEC_HIDDEN
 
SECURITY_STATUS SEC_ENTRY thunk_ImportSecurityContextW (SEC_WCHAR *pszPackage, PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext) DECLSPEC_HIDDEN
 
SECURITY_STATUS SEC_ENTRY thunk_AddCredentialsA (PCredHandle hCredentials, SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialUse, void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument, PTimeStamp ptsExpiry) DECLSPEC_HIDDEN
 
SECURITY_STATUS SEC_ENTRY thunk_AddCredentialsW (PCredHandle hCredentials, SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialUse, void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument, PTimeStamp ptsExpiry) DECLSPEC_HIDDEN
 
SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesA (PCredHandle phCredential, ULONG ulAttribute, void *pBuffer) DECLSPEC_HIDDEN
 
SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesW (PCredHandle phCredential, ULONG ulAttribute, void *pBuffer) DECLSPEC_HIDDEN
 
SECURITY_STATUS SEC_ENTRY thunk_QueryContextAttributesA (PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer) DECLSPEC_HIDDEN
 
SECURITY_STATUS SEC_ENTRY thunk_QueryContextAttributesW (PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer) DECLSPEC_HIDDEN
 
SECURITY_STATUS SEC_ENTRY thunk_SetContextAttributesA (PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer, ULONG cbBuffer) DECLSPEC_HIDDEN
 
SECURITY_STATUS SEC_ENTRY thunk_SetContextAttributesW (PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer, ULONG cbBuffer) DECLSPEC_HIDDEN
 

Function Documentation

◆ thunk_AcquireCredentialsHandleA()

SECURITY_STATUS SEC_ENTRY thunk_AcquireCredentialsHandleA ( SEC_CHAR pszPrincipal,
SEC_CHAR pszPackage,
ULONG  fCredentialsUse,
PLUID  pvLogonID,
PVOID  pAuthData,
SEC_GET_KEY_FN  pGetKeyFn,
PVOID  pvGetKeyArgument,
PCredHandle  phCredential,
PTimeStamp  ptsExpiry 
)

Definition at line 26 of file thunks.c.

30{
32
33 TRACE("%s %s %d %p %p %p %p %p %p\n", debugstr_a(pszPrincipal),
34 debugstr_a(pszPackage), fCredentialsUse, pvLogonID, pAuthData, pGetKeyFn,
35 pvGetKeyArgument, phCredential, ptsExpiry);
36 if (pszPackage)
37 {
38 UNICODE_STRING principal, package;
39
40 RtlCreateUnicodeStringFromAsciiz(&principal, pszPrincipal);
41 RtlCreateUnicodeStringFromAsciiz(&package, pszPackage);
42 ret = AcquireCredentialsHandleW(principal.Buffer, package.Buffer,
43 fCredentialsUse, pvLogonID, pAuthData, pGetKeyFn, pvGetKeyArgument,
44 phCredential, ptsExpiry);
45 RtlFreeUnicodeString(&principal);
46 RtlFreeUnicodeString(&package);
47 }
48 else
50 return ret;
51}
#define debugstr_a
Definition: kernel32.h:31
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
LONG SECURITY_STATUS
Definition: sspi.h:34
#define TRACE(s)
Definition: solgame.cpp:4
int ret
#define SEC_E_SECPKG_NOT_FOUND
Definition: winerror.h:2914
SECURITY_STATUS WINAPI AcquireCredentialsHandleW(SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialsUse, PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry)
Definition: wrapper.c:105

Referenced by _makeFnTableA().

◆ thunk_AcquireCredentialsHandleW()

SECURITY_STATUS SEC_ENTRY thunk_AcquireCredentialsHandleW ( SEC_WCHAR pszPrincipal,
SEC_WCHAR pszPackage,
ULONG  fCredentialsUse,
PLUID  pvLogonID,
PVOID  pAuthData,
SEC_GET_KEY_FN  pGetKeyFn,
PVOID  pvGetKeyArgument,
PCredHandle  phCredential,
PTimeStamp  ptsExpiry 
)

Definition at line 53 of file thunks.c.

57{
59
60 TRACE("%s %s %d %p %p %p %p %p %p\n", debugstr_w(pszPrincipal),
61 debugstr_w(pszPackage), fCredentialsUse, pvLogonID, pAuthData, pGetKeyFn,
62 pvGetKeyArgument, phCredential, ptsExpiry);
63 if (pszPackage)
64 {
65 PSTR principal, package;
66
67 principal = SECUR32_AllocMultiByteFromWide(pszPrincipal);
68 package = SECUR32_AllocMultiByteFromWide(pszPackage);
69 ret = AcquireCredentialsHandleA(principal, package, fCredentialsUse,
70 pvLogonID, pAuthData, pGetKeyFn, pvGetKeyArgument, phCredential,
71 ptsExpiry);
72 HeapFree(GetProcessHeap(), 0, principal);
73 HeapFree(GetProcessHeap(), 0, package);
74 }
75 else
77 return ret;
78}
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
#define debugstr_w
Definition: kernel32.h:32
PSTR SECUR32_AllocMultiByteFromWide(PCWSTR str)
Definition: secur32_wine.c:268
char * PSTR
Definition: typedefs.h:51
SECURITY_STATUS WINAPI AcquireCredentialsHandleA(SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialsUse, PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry)
Definition: wrapper.c:59

Referenced by _makeFnTableW().

◆ thunk_AddCredentialsA()

SECURITY_STATUS SEC_ENTRY thunk_AddCredentialsA ( PCredHandle  hCredentials,
SEC_CHAR pszPrincipal,
SEC_CHAR pszPackage,
ULONG  fCredentialUse,
void pAuthData,
SEC_GET_KEY_FN  pGetKeyFn,
void pvGetKeyArgument,
PTimeStamp  ptsExpiry 
)

Definition at line 268 of file thunks.c.

272{
274
275 TRACE("%p %s %s %d %p %p %p %p\n", hCredentials, debugstr_a(pszPrincipal),
276 debugstr_a(pszPackage), fCredentialUse, pAuthData, pGetKeyFn,
277 pvGetKeyArgument, ptsExpiry);
278 if (hCredentials)
279 {
280 SecurePackage *package = (SecurePackage *)hCredentials->dwUpper;
281 PCredHandle cred = (PCtxtHandle)hCredentials->dwLower;
282
283 if (package && package->provider)
284 {
285 if (package->provider->fnTableW.AddCredentialsW)
286 {
287 UNICODE_STRING szPrincipal, szPackage;
288
289 RtlCreateUnicodeStringFromAsciiz(&szPrincipal, pszPrincipal);
290 RtlCreateUnicodeStringFromAsciiz(&szPackage, pszPackage);
291 ret = package->provider->fnTableW.AddCredentialsW(
292 cred, szPrincipal.Buffer, szPackage.Buffer, fCredentialUse,
293 pAuthData, pGetKeyFn, pvGetKeyArgument, ptsExpiry);
294 RtlFreeUnicodeString(&szPrincipal);
295 RtlFreeUnicodeString(&szPackage);
296 }
297 else
299 }
300 else
302 }
303 else
305 return ret;
306}
if(dx< 0)
Definition: linetemp.h:194
PSecHandle PCtxtHandle
Definition: sspi.h:71
ULONG_PTR dwLower
Definition: sspi.h:53
#define SEC_E_INVALID_HANDLE
Definition: winerror.h:2910
#define SEC_E_UNSUPPORTED_FUNCTION
Definition: winerror.h:2911

Referenced by _makeFnTableA().

◆ thunk_AddCredentialsW()

SECURITY_STATUS SEC_ENTRY thunk_AddCredentialsW ( PCredHandle  hCredentials,
SEC_WCHAR pszPrincipal,
SEC_WCHAR pszPackage,
ULONG  fCredentialUse,
void pAuthData,
SEC_GET_KEY_FN  pGetKeyFn,
void pvGetKeyArgument,
PTimeStamp  ptsExpiry 
)

Definition at line 308 of file thunks.c.

312{
314
315 TRACE("%p %s %s %d %p %p %p %p\n", hCredentials, debugstr_w(pszPrincipal),
316 debugstr_w(pszPackage), fCredentialUse, pAuthData, pGetKeyFn,
317 pvGetKeyArgument, ptsExpiry);
318 if (hCredentials)
319 {
320 SecurePackage *package = (SecurePackage *)hCredentials->dwUpper;
321 PCredHandle cred = (PCtxtHandle)hCredentials->dwLower;
322
323 if (package && package->provider)
324 {
325 if (package->provider->fnTableA.AddCredentialsA)
326 {
327 PSTR szPrincipal = SECUR32_AllocMultiByteFromWide(pszPrincipal);
328 PSTR szPackage = SECUR32_AllocMultiByteFromWide(pszPackage);
329
330 ret = package->provider->fnTableA.AddCredentialsA(
331 cred, szPrincipal, szPackage, fCredentialUse, pAuthData,
332 pGetKeyFn, pvGetKeyArgument, ptsExpiry);
333 HeapFree(GetProcessHeap(), 0, szPrincipal);
334 HeapFree(GetProcessHeap(), 0, szPackage);
335 }
336 else
338 }
339 else
341 }
342 else
344 return ret;
345}

Referenced by _makeFnTableW().

◆ thunk_ImportSecurityContextA()

SECURITY_STATUS SEC_ENTRY thunk_ImportSecurityContextA ( SEC_CHAR pszPackage,
PSecBuffer  pPackedContext,
void Token,
PCtxtHandle  phContext 
)

Definition at line 864 of file thunks.c.

867{
869 UNICODE_STRING package;
870
871 TRACE("%s %p %p %p\n", debugstr_a(pszPackage), pPackedContext, Token,
872 phContext);
873 RtlCreateUnicodeStringFromAsciiz(&package, pszPackage);
874 ret = ImportSecurityContextW(package.Buffer, pPackedContext, Token,
875 phContext);
876 RtlFreeUnicodeString(&package);
877 return ret;
878}
SECURITY_STATUS WINAPI ImportSecurityContextW(SEC_WCHAR *pszPackage, PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext)
Definition: wrapper.c:872

Referenced by _makeFnTableA().

◆ thunk_ImportSecurityContextW()

SECURITY_STATUS SEC_ENTRY thunk_ImportSecurityContextW ( SEC_WCHAR pszPackage,
PSecBuffer  pPackedContext,
void Token,
PCtxtHandle  phContext 
)

Definition at line 880 of file thunks.c.

883{
885 PSTR package = SECUR32_AllocMultiByteFromWide(pszPackage);
886
887 TRACE("%s %p %p %p\n", debugstr_w(pszPackage), pPackedContext, Token,
888 phContext);
889 ret = ImportSecurityContextA(package, pPackedContext, Token, phContext);
890 HeapFree(GetProcessHeap(), 0, package);
891 return ret;
892}
SECURITY_STATUS WINAPI ImportSecurityContextA(SEC_CHAR *pszPackage, PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext)
Definition: wrapper.c:837

Referenced by _makeFnTableW().

◆ thunk_InitializeSecurityContextA()

SECURITY_STATUS SEC_ENTRY thunk_InitializeSecurityContextA ( PCredHandle  phCredential,
PCtxtHandle  phContext,
SEC_CHAR pszTargetName,
ULONG  fContextReq,
ULONG  Reserved1,
ULONG  TargetDataRep,
PSecBufferDesc  pInput,
ULONG  Reserved2,
PCtxtHandle  phNewContext,
PSecBufferDesc  pOutput,
ULONG pfContextAttr,
PTimeStamp  ptsExpiry 
)

Definition at line 189 of file thunks.c.

195{
197
198 TRACE("%p %p %s %d %d %d %p %d %p %p %p %p\n", phCredential, phContext,
199 debugstr_a(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput,
200 Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry);
201 if (phCredential)
202 {
203 SecurePackage *package = (SecurePackage *)phCredential->dwUpper;
204
205 if (package && package->provider)
206 {
207 if (package->provider->fnTableW.InitializeSecurityContextW)
208 {
210
212 ret = package->provider->fnTableW.InitializeSecurityContextW(
213 phCredential, phContext, target.Buffer, fContextReq, Reserved1,
214 TargetDataRep, pInput, Reserved2, phNewContext, pOutput,
215 pfContextAttr, ptsExpiry);
217 }
218 else
220 }
221 else
223 }
224 else
226 return ret;
227}
@ Reserved2
Definition: bcd.h:202
@ Reserved1
Definition: bcd.h:201
GLenum target
Definition: glext.h:7315

Referenced by _makeFnTableA().

◆ thunk_InitializeSecurityContextW()

SECURITY_STATUS SEC_ENTRY thunk_InitializeSecurityContextW ( PCredHandle  phCredential,
PCtxtHandle  phContext,
SEC_WCHAR pszTargetName,
ULONG  fContextReq,
ULONG  Reserved1,
ULONG  TargetDataRep,
PSecBufferDesc  pInput,
ULONG  Reserved2,
PCtxtHandle  phNewContext,
PSecBufferDesc  pOutput,
ULONG pfContextAttr,
PTimeStamp  ptsExpiry 
)

Definition at line 229 of file thunks.c.

235{
237
238 TRACE("%p %p %s %d %d %d %p %d %p %p %p %p\n", phCredential, phContext,
239 debugstr_w(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput,
240 Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry);
241 if (phCredential)
242 {
243 SecurePackage *package = (SecurePackage *)phCredential->dwUpper;
244
245 if (package && package->provider)
246 {
247 if (package->provider->fnTableA.InitializeSecurityContextA)
248 {
250
251 ret = package->provider->fnTableA.InitializeSecurityContextA(
252 phCredential, phContext, target, fContextReq, Reserved1,
253 TargetDataRep, pInput, Reserved2, phNewContext, pOutput,
254 pfContextAttr, ptsExpiry);
256 }
257 else
259 }
260 else
262 }
263 else
265 return ret;
266}

Referenced by _makeFnTableW().

◆ thunk_QueryContextAttributesA()

SECURITY_STATUS SEC_ENTRY thunk_QueryContextAttributesA ( PCtxtHandle  phContext,
ULONG  ulAttribute,
void pBuffer 
)

Definition at line 540 of file thunks.c.

542{
544
545 TRACE("%p %d %p\n", phContext, ulAttribute, pBuffer);
546 if (phContext)
547 {
548 SecurePackage *package = (SecurePackage *)phContext->dwUpper;
549 PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower;
550
551 if (package && package->provider)
552 {
553 if (package->provider->fnTableW.QueryContextAttributesW)
554 {
555 ret = package->provider->fnTableW.QueryContextAttributesW(
556 ctxt, ulAttribute, pBuffer);
557 if (ret == SEC_E_OK)
558 ret = thunk_ContextAttributesWToA(package, ulAttribute,
559 pBuffer);
560 }
561 else
563 }
564 else
566 }
567 else
569 return ret;
570}
PVOID pBuffer
static SECURITY_STATUS thunk_ContextAttributesWToA(SecurePackage *package, ULONG ulAttribute, void *pBuffer)
Definition: thunks.c:398
#define SEC_E_OK
Definition: winerror.h:2356

Referenced by _makeFnTableA().

◆ thunk_QueryContextAttributesW()

SECURITY_STATUS SEC_ENTRY thunk_QueryContextAttributesW ( PCtxtHandle  phContext,
ULONG  ulAttribute,
void pBuffer 
)

Definition at line 766 of file thunks.c.

768{
770
771 TRACE("%p %d %p\n", phContext, ulAttribute, pBuffer);
772 if (phContext)
773 {
774 SecurePackage *package = (SecurePackage *)phContext->dwUpper;
775 PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower;
776
777 if (package && package->provider)
778 {
779 if (package->provider->fnTableA.QueryContextAttributesA)
780 {
781 ret = package->provider->fnTableA.QueryContextAttributesA(
782 ctxt, ulAttribute, pBuffer);
783 if (ret == SEC_E_OK)
784 ret = thunk_ContextAttributesAToW(package, ulAttribute,
785 pBuffer);
786 }
787 else
789 }
790 else
792 }
793 else
795 return ret;
796}
static SECURITY_STATUS thunk_ContextAttributesAToW(SecurePackage *package, ULONG ulAttribute, void *pBuffer)
Definition: thunks.c:623

Referenced by _makeFnTableW().

◆ thunk_QueryCredentialsAttributesA()

SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesA ( PCredHandle  phCredential,
ULONG  ulAttribute,
void pBuffer 
)

Definition at line 83 of file thunks.c.

85{
87
88 TRACE("%p %d %p\n", phCredential, ulAttribute, pBuffer);
89 if (phCredential)
90 {
91 SecurePackage *package = (SecurePackage *)phCredential->dwUpper;
92 PCredHandle cred = (PCredHandle)phCredential->dwLower;
93
94 if (package && package->provider)
95 {
96 if (package->provider->fnTableW.QueryCredentialsAttributesW)
97 {
98 ret = package->provider->fnTableW.QueryCredentialsAttributesW(
99 cred, ulAttribute, pBuffer);
100 if (ret == SEC_E_OK)
101 {
102 switch (ulAttribute)
103 {
105 {
108 SEC_WCHAR *oldUser = names->sUserName;
109
110 if (oldUser)
111 {
112 names->sUserName =
114 package->provider->fnTableW.FreeContextBuffer(
115 oldUser);
116 }
117 break;
118 }
119 default:
120 WARN("attribute type %d unknown\n", ulAttribute);
122 }
123 }
124 }
125 else
127 }
128 else
130 }
131 else
133 return ret;
134}
#define WARN(fmt,...)
Definition: debug.h:112
GLuint GLuint * names
Definition: glext.h:11545
#define SECPKG_CRED_ATTR_NAMES
Definition: sspi.h:246
struct _SecPkgCredentials_NamesW * PSecPkgCredentials_NamesW
PSecHandle PCredHandle
Definition: sspi.h:68
WCHAR SEC_WCHAR
Definition: sspi.h:29
uint16_t * PWSTR
Definition: typedefs.h:56
#define SEC_E_INTERNAL_ERROR
Definition: winerror.h:2913

Referenced by _makeFnTableA().

◆ thunk_QueryCredentialsAttributesW()

SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesW ( PCredHandle  phCredential,
ULONG  ulAttribute,
void pBuffer 
)

Definition at line 136 of file thunks.c.

138{
140
141 TRACE("%p %d %p\n", phCredential, ulAttribute, pBuffer);
142 if (phCredential)
143 {
144 SecurePackage *package = (SecurePackage *)phCredential->dwUpper;
145 PCredHandle cred = (PCredHandle)phCredential->dwLower;
146
147 if (package && package->provider)
148 {
149 if (package->provider->fnTableA.QueryCredentialsAttributesA)
150 {
151 ret = package->provider->fnTableA.QueryCredentialsAttributesA(
152 cred, ulAttribute, pBuffer);
153 if (ret == SEC_E_OK)
154 {
155 switch (ulAttribute)
156 {
158 {
161 SEC_CHAR *oldUser = names->sUserName;
162
163 if (oldUser)
164 {
165 names->sUserName =
167 package->provider->fnTableA.FreeContextBuffer(
168 oldUser);
169 }
170 break;
171 }
172 default:
173 WARN("attribute type %d unknown\n", ulAttribute);
175 }
176 }
177 }
178 else
180 }
181 else
183 }
184 else
186 return ret;
187}
CHAR SEC_CHAR
Definition: sspi.h:30
struct _SecPkgCredentials_NamesA * PSecPkgCredentials_NamesA
PWSTR SECUR32_AllocWideFromMultiByte(PCSTR str)
Definition: secur32_wine.c:246

Referenced by _makeFnTableW().

◆ thunk_SetContextAttributesA()

SECURITY_STATUS SEC_ENTRY thunk_SetContextAttributesA ( PCtxtHandle  phContext,
ULONG  ulAttribute,
void pBuffer,
ULONG  cbBuffer 
)

Definition at line 798 of file thunks.c.

800{
802
803 TRACE("%p %d %p %d\n", phContext, ulAttribute, pBuffer, cbBuffer);
804 if (phContext)
805 {
806 SecurePackage *package = (SecurePackage *)phContext->dwUpper;
807 PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower;
808
809 if (package && package->provider && pBuffer && cbBuffer)
810 {
811 if (package->provider->fnTableW.SetContextAttributesW)
812 {
813 /* TODO: gotta validate size too! */
814 ret = thunk_ContextAttributesWToA(package, ulAttribute,
815 pBuffer);
816 if (ret == SEC_E_OK)
817 ret = package->provider->fnTableW.SetContextAttributesW(
818 ctxt, ulAttribute, pBuffer, cbBuffer);
819 }
820 else
822 }
823 else
825 }
826 else
828 return ret;
829}

Referenced by _makeFnTableA().

◆ thunk_SetContextAttributesW()

SECURITY_STATUS SEC_ENTRY thunk_SetContextAttributesW ( PCtxtHandle  phContext,
ULONG  ulAttribute,
void pBuffer,
ULONG  cbBuffer 
)

Definition at line 831 of file thunks.c.

833{
835
836 TRACE("%p %d %p %d\n", phContext, ulAttribute, pBuffer, cbBuffer);
837 if (phContext)
838 {
839 SecurePackage *package = (SecurePackage *)phContext->dwUpper;
840 PCtxtHandle ctxt = (PCtxtHandle)phContext->dwLower;
841
842 if (package && package->provider && pBuffer && cbBuffer)
843 {
844 if (package->provider->fnTableA.SetContextAttributesA)
845 {
846 /* TODO: gotta validate size too! */
847 ret = thunk_ContextAttributesAToW(package, ulAttribute,
848 pBuffer);
849 if (ret == SEC_E_OK)
850 ret = package->provider->fnTableA.SetContextAttributesA(
851 ctxt, ulAttribute, pBuffer, cbBuffer);
852 }
853 else
855 }
856 else
858 }
859 else
861 return ret;
862}

Referenced by _makeFnTableW().