34 debugstr_a(pszPackage), fCredentialsUse, pvLogonID, pAuthData, pGetKeyFn,
35 pvGetKeyArgument, phCredential, ptsExpiry);
43 fCredentialsUse, pvLogonID, pAuthData, pGetKeyFn, pvGetKeyArgument,
44 phCredential, ptsExpiry);
61 debugstr_w(pszPackage), fCredentialsUse, pvLogonID, pAuthData, pGetKeyFn,
62 pvGetKeyArgument, phCredential, ptsExpiry);
65 PSTR principal, package;
68 package = SECUR32_AllocMultiByteFromWide(pszPackage);
70 pvLogonID, pAuthData, pGetKeyFn, pvGetKeyArgument, phCredential,
91 SecurePackage *
package = (SecurePackage *)phCredential->dwUpper;
94 if (package && package->provider)
96 if (package->provider->fnTableW.QueryCredentialsAttributesW)
98 ret = package->provider->fnTableW.QueryCredentialsAttributesW(
114 package->provider->fnTableW.FreeContextBuffer(
120 WARN(
"attribute type %d unknown\n", ulAttribute);
141 TRACE(
"%p %d %p\n", phCredential, ulAttribute,
pBuffer);
144 SecurePackage *
package = (SecurePackage *)phCredential->dwUpper;
147 if (package && package->provider)
149 if (package->provider->fnTableA.QueryCredentialsAttributesA)
151 ret = package->provider->fnTableA.QueryCredentialsAttributesA(
167 package->provider->fnTableA.FreeContextBuffer(
173 WARN(
"attribute type %d unknown\n", ulAttribute);
198 TRACE(
"%p %p %s %d %d %d %p %d %p %p %p %p\n", phCredential, phContext,
200 Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry);
203 SecurePackage *
package = (SecurePackage *)phCredential->dwUpper;
205 if (package && package->provider)
207 if (package->provider->fnTableW.InitializeSecurityContextW)
212 ret = package->provider->fnTableW.InitializeSecurityContextW(
214 TargetDataRep, pInput,
Reserved2, phNewContext, pOutput,
215 pfContextAttr, ptsExpiry);
238 TRACE(
"%p %p %s %d %d %d %p %d %p %p %p %p\n", phCredential, phContext,
240 Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry);
243 SecurePackage *
package = (SecurePackage *)phCredential->dwUpper;
245 if (package && package->provider)
247 if (package->provider->fnTableA.InitializeSecurityContextA)
251 ret = package->provider->fnTableA.InitializeSecurityContextA(
253 TargetDataRep, pInput,
Reserved2, phNewContext, pOutput,
254 pfContextAttr, ptsExpiry);
270 void *pAuthData,
SEC_GET_KEY_FN pGetKeyFn,
void *pvGetKeyArgument,
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);
280 SecurePackage *
package = (SecurePackage *)hCredentials->dwUpper;
283 if (package && package->provider)
285 if (package->provider->fnTableW.AddCredentialsW)
291 ret = package->provider->fnTableW.AddCredentialsW(
292 cred, szPrincipal.
Buffer, szPackage.
Buffer, fCredentialUse,
293 pAuthData, pGetKeyFn, pvGetKeyArgument, ptsExpiry);
310 void *pAuthData,
SEC_GET_KEY_FN pGetKeyFn,
void *pvGetKeyArgument,
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);
320 SecurePackage *
package = (SecurePackage *)hCredentials->dwUpper;
323 if (package && package->provider)
325 if (package->provider->fnTableA.AddCredentialsA)
330 ret = package->provider->fnTableA.AddCredentialsA(
331 cred, szPrincipal, szPackage, fCredentialUse, pAuthData,
332 pGetKeyFn, pvGetKeyArgument, ptsExpiry);
354 int nameLen = 0, commentLen = 0;
360 bytesNeeded += nameLen;
366 bytesNeeded += commentLen;
376 ret->Name = nextString;
379 nextString += nameLen;
385 ret->Comment = nextString;
428 names->sAuthorityName =
442 info->sSignatureAlgorithmName =
449 info->sEncryptAlgorithmName =
513 name->sCredentialName =
531 WARN(
"attribute type %d unknown\n", ulAttribute);
548 SecurePackage *
package = (SecurePackage *)phContext->dwUpper;
551 if (package && package->provider)
553 if (package->provider->fnTableW.QueryContextAttributesW)
555 ret = package->provider->fnTableW.QueryContextAttributesW(
579 int nameLen = 0, commentLen = 0;
585 bytesNeeded += nameLen *
sizeof(
WCHAR);
591 bytesNeeded += commentLen *
sizeof(
WCHAR);
601 ret->Name = nextString;
604 nextString += nameLen;
610 ret->Comment = nextString;
653 names->sAuthorityName =
662 SEC_CHAR *oldSigAlgName =
info->sSignatureAlgorithmName;
667 info->sSignatureAlgorithmName =
674 info->sEncryptAlgorithmName =
735 PSTR oldCred =
name->sCredentialName;
739 name->sCredentialName =
757 WARN(
"attribute type %d unknown\n", ulAttribute);
774 SecurePackage *
package = (SecurePackage *)phContext->dwUpper;
777 if (package && package->provider)
779 if (package->provider->fnTableA.QueryContextAttributesA)
781 ret = package->provider->fnTableA.QueryContextAttributesA(
803 TRACE(
"%p %d %p %d\n", phContext, ulAttribute,
pBuffer, cbBuffer);
806 SecurePackage *
package = (SecurePackage *)phContext->dwUpper;
809 if (package && package->provider &&
pBuffer && cbBuffer)
811 if (package->provider->fnTableW.SetContextAttributesW)
817 ret = package->provider->fnTableW.SetContextAttributesW(
818 ctxt, ulAttribute,
pBuffer, cbBuffer);
836 TRACE(
"%p %d %p %d\n", phContext, ulAttribute,
pBuffer, cbBuffer);
839 SecurePackage *
package = (SecurePackage *)phContext->dwUpper;
842 if (package && package->provider &&
pBuffer && cbBuffer)
844 if (package->provider->fnTableA.SetContextAttributesA)
850 ret = package->provider->fnTableA.SetContextAttributesA(
851 ctxt, ulAttribute,
pBuffer, cbBuffer);
885 PSTR package = SECUR32_AllocMultiByteFromWide(pszPackage);
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
static const SecPkgInfoW infoW
static const SecPkgInfoA infoA
#define memcpy(s1, s2, n)
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
PVOID *typedef PSecBuffer
#define SECPKG_ATTR_ACCESS_TOKEN
struct _SecPkgContext_CredentialNameA * PSecPkgContext_CredentialNameA
struct _SecPkgInfoW SecPkgInfoW
struct _SecPkgContext_PackageInfoW * PSecPkgContext_PackageInfoW
struct _SecPkgInfoW * PSecPkgInfoW
struct _SecPkgContext_NativeNamesA * PSecPkgContext_NativeNamesA
#define SECPKG_ATTR_SESSION_KEY
struct _SecPkgContext_NamesW * PSecPkgContext_NamesW
struct _SecPkgContext_KeyInfoA * PSecPkgContext_KeyInfoA
#define SECPKG_ATTR_AUTHORITY
#define SECPKG_ATTR_KEY_INFO
struct _SecPkgInfoA SecPkgInfoA
#define SECPKG_CRED_ATTR_NAMES
#define SECPKG_ATTR_PACKAGE_INFO
#define SECPKG_ATTR_NEGOTIATION_INFO
struct _SecPkgContext_NegotiationInfoA * PSecPkgContext_NegotiationInfoA
#define SECPKG_ATTR_CREDENTIAL_NAME
struct _SecPkgContext_PackageInfoA * PSecPkgContext_PackageInfoA
struct _SecPkgCredentials_NamesW * PSecPkgCredentials_NamesW
void(SEC_ENTRY * SEC_GET_KEY_FN)(void *Arg, void *Principal, ULONG KeyVer, void **Key, SECURITY_STATUS *Status)
struct _SecPkgContext_AuthorityA * PSecPkgContext_AuthorityA
#define SECPKG_ATTR_TARGET_INFORMATION
struct _SecPkgInfoA * PSecPkgInfoA
struct _SecPkgContext_NamesA * PSecPkgContext_NamesA
struct _SecPkgCredentials_NamesA * PSecPkgCredentials_NamesA
#define SECPKG_ATTR_PASSWORD_EXPIRY
#define SECPKG_ATTR_LIFESPAN
struct _SecPkgContext_NativeNamesW * PSecPkgContext_NativeNamesW
#define SECPKG_ATTR_SIZES
struct _SecPkgContext_AuthorityW * PSecPkgContext_AuthorityW
#define SECPKG_ATTR_STREAM_SIZES
#define SECPKG_ATTR_FLAGS
struct _SecPkgContext_KeyInfoW * PSecPkgContext_KeyInfoW
#define SECPKG_ATTR_NAMES
struct _SecPkgContext_NegotiationInfoW * PSecPkgContext_NegotiationInfoW
#define SECPKG_ATTR_DCE_INFO
#define SECPKG_ATTR_NATIVE_NAMES
struct _SecPkgContext_CredentialNameW * PSecPkgContext_CredentialNameW
PSTR SECUR32_AllocMultiByteFromWide(PCWSTR str)
PWSTR SECUR32_AllocWideFromMultiByte(PCSTR str)
FREE_CONTEXT_BUFFER_FN FreeContextBuffer
SecureProvider * provider
SecurityFunctionTableW fnTableW
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)
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)
SECURITY_STATUS SEC_ENTRY thunk_ImportSecurityContextA(SEC_CHAR *pszPackage, PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext)
SECURITY_STATUS SEC_ENTRY thunk_SetContextAttributesA(PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer, ULONG cbBuffer)
SECURITY_STATUS SEC_ENTRY thunk_SetContextAttributesW(PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer, ULONG cbBuffer)
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)
static PSecPkgInfoW _copyPackageInfoFlatAToW(const SecPkgInfoA *infoA)
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)
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)
static SECURITY_STATUS thunk_ContextAttributesAToW(SecurePackage *package, ULONG ulAttribute, void *pBuffer)
static SECURITY_STATUS thunk_ContextAttributesWToA(SecurePackage *package, ULONG ulAttribute, void *pBuffer)
SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesA(PCredHandle phCredential, ULONG ulAttribute, void *pBuffer)
SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesW(PCredHandle phCredential, ULONG ulAttribute, void *pBuffer)
SECURITY_STATUS SEC_ENTRY thunk_QueryContextAttributesW(PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer)
SECURITY_STATUS SEC_ENTRY thunk_QueryContextAttributesA(PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer)
static PSecPkgInfoA _copyPackageInfoFlatWToA(const SecPkgInfoW *infoW)
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)
SECURITY_STATUS SEC_ENTRY thunk_ImportSecurityContextW(SEC_WCHAR *pszPackage, PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext)
#define SEC_E_INVALID_HANDLE
#define SEC_E_INTERNAL_ERROR
#define SEC_E_UNSUPPORTED_FUNCTION
#define SEC_E_SECPKG_NOT_FOUND
#define SEC_E_INVALID_TOKEN
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)
SECURITY_STATUS WINAPI ImportSecurityContextA(SEC_CHAR *pszPackage, PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext)
SECURITY_STATUS WINAPI ImportSecurityContextW(SEC_WCHAR *pszPackage, PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext)
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)