34 FIXME(
"%p, %u, %p\n", phCredential, ulAttribute,
pBuffer);
44 FIXME(
"%p, %u, %p\n", phCredential, ulAttribute,
pBuffer);
59 TRACE(
"%s, %s, 0x%08x, %p, %p, %p, %p, %p, %p\n",
61 pLogonID, pAuthData, pGetKeyFn, pGetKeyArgument, phCredential, ptsExpiry);
63 FIXME(
"forwarding to NTLM\n");
65 pLogonID, pAuthData, pGetKeyFn, pGetKeyArgument,
66 phCredential, ptsExpiry );
87 TRACE(
"%s, %s, 0x%08x, %p, %p, %p, %p, %p, %p\n",
89 pLogonID, pAuthData, pGetKeyFn, pGetKeyArgument, phCredential, ptsExpiry);
94 package = HeapAlloc( GetProcessHeap(), 0, package_len * sizeof(SEC_WCHAR) );
101 int user_len, domain_len, passwd_len;
106 if (!identityW)
goto done;
108 if (!
identity->UserLength) user_len = 0;
114 if (!
user)
goto done;
118 if (!
identity->DomainLength) domain_len = 0;
128 if (!
identity->PasswordLength) passwd_len = 0;
134 if (!passwd)
goto done;
136 passwd, passwd_len );
139 identityW->User =
user;
140 identityW->UserLength = user_len;
141 identityW->Domain =
domain;
142 identityW->DomainLength = domain_len;
143 identityW->Password = passwd;
144 identityW->PasswordLength = passwd_len;
149 pGetKeyFn, pGetKeyArgument, phCredential, ptsExpiry );
168 TRACE(
"%p, %p, %s, 0x%08x, %u, %u, %p, %u, %p, %p, %p, %p\n",
169 phCredential, phContext,
debugstr_w(pszTargetName), fContextReq,
171 pfContextAttr, ptsExpiry);
176 pOutput, pfContextAttr, ptsExpiry );
191 TRACE(
"%p, %p, %s, 0x%08x, %u, %u, %p, %u, %p, %p, %p, %p\n",
192 phCredential, phContext,
debugstr_a(pszTargetName), fContextReq,
194 pfContextAttr, ptsExpiry);
205 phNewContext, pOutput, pfContextAttr, ptsExpiry );
218 TRACE(
"%p, %p, %p, 0x%08x, %u, %p, %p, %p, %p\n", phCredential, phContext,
219 pInput, fContextReq, TargetDataRep, phNewContext, pOutput, pfContextAttr,
223 fContextReq, TargetDataRep, phNewContext,
224 pOutput, pfContextAttr, ptsExpiry );
235 TRACE(
"%p %p\n", phContext, pToken);
252 TRACE(
"%p\n", phContext);
265 TRACE(
"%p %p\n", phContext, pInput);
290 sizes->cbMaxToken = 2888;
291 sizes->cbMaxSignature = 16;
292 sizes->cbSecurityTrailer = 16;
293 sizes->cbBlockSize = 0;
321 sizes->cbMaxToken = 2888;
322 sizes->cbMaxSignature = 16;
323 sizes->cbSecurityTrailer = 16;
324 sizes->cbBlockSize = 0;
346 TRACE(
"%p\n", phContext);
365 TRACE(
"%p\n", phContext);
383 TRACE(
"%p, 0x%08x, %p, %u\n", phContext, fQOP, pMessage, MessageSeqNo);
394 TRACE(
"%p, %p, %u, %p\n", phContext, pMessage, MessageSeqNo, pfQOP);
404 TRACE(
"%p\n", phCredential);
415 TRACE(
"%p, 0x%08x, %p, %u\n", phContext, fQOP, pMessage, MessageSeqNo);
426 TRACE(
"%p, %p, %u, %p\n", phContext, pMessage, MessageSeqNo, pfQOP);
493#define NEGO_MAX_TOKEN 12000
499 {
'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
' ',
'P',
'a',
'c',
'k',
'a',
'g',
'e',
' ',
500 'N',
'e',
'g',
'o',
't',
'i',
'a',
't',
'o',
'r',0};
504 SECPKG_FLAG_INTEGRITY | \
505 SECPKG_FLAG_PRIVACY | \
506 SECPKG_FLAG_CONNECTION | \
507 SECPKG_FLAG_MULTI_REQUIRED | \
508 SECPKG_FLAG_EXTENDED_ERROR | \
509 SECPKG_FLAG_IMPERSONATION | \
510 SECPKG_FLAG_ACCEPT_WIN32_NAME | \
511 SECPKG_FLAG_NEGOTIABLE | \
512 SECPKG_FLAG_GSS_COMPATIBLE | \
513 SECPKG_FLAG_LOGON | \
514 SECPKG_FLAG_RESTRICTED_TOKENS )
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void user(int argc, const char *argv[])
#define HeapFree(x, y, z)
#define MultiByteToWideChar
static SECURITY_STATUS SEC_ENTRY nego_QueryCredentialsAttributesA(PCredHandle phCredential, ULONG ulAttribute, PVOID pBuffer)
static SECURITY_STATUS SEC_ENTRY nego_DecryptMessage(PCtxtHandle phContext, PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP)
static SECURITY_STATUS SEC_ENTRY nego_VerifySignature(PCtxtHandle phContext, PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP)
static SECURITY_STATUS SEC_ENTRY nego_ApplyControlToken(PCtxtHandle phContext, PSecBufferDesc pInput)
static const SecurityFunctionTableA negoTableA
static SECURITY_STATUS SEC_ENTRY nego_AcceptSecurityContext(PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, ULONG fContextReq, ULONG TargetDataRep, PCtxtHandle phNewContext, PSecBufferDesc pOutput, ULONG *pfContextAttr, PTimeStamp ptsExpiry)
static SECURITY_STATUS SEC_ENTRY nego_QueryCredentialsAttributesW(PCredHandle phCredential, ULONG ulAttribute, PVOID pBuffer)
static SECURITY_STATUS SEC_ENTRY nego_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)
static SECURITY_STATUS SEC_ENTRY nego_AcquireCredentialsHandleW(SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialUse, PLUID pLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, PVOID pGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry)
static SECURITY_STATUS SEC_ENTRY nego_EncryptMessage(PCtxtHandle phContext, ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo)
static SECURITY_STATUS SEC_ENTRY nego_QueryContextAttributesA(PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer)
static SECURITY_STATUS SEC_ENTRY nego_DeleteSecurityContext(PCtxtHandle phContext)
static SECURITY_STATUS SEC_ENTRY nego_RevertSecurityContext(PCtxtHandle phContext)
static WCHAR negotiate_comment_W[]
void SECUR32_initNegotiateSP(void)
static SECURITY_STATUS SEC_ENTRY nego_QueryContextAttributesW(PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer)
static WCHAR nego_name_W[]
static const SecurityFunctionTableW negoTableW
static char nego_name_A[]
static SECURITY_STATUS SEC_ENTRY nego_ImpersonateSecurityContext(PCtxtHandle phContext)
static CHAR negotiate_comment_A[]
static SECURITY_STATUS SEC_ENTRY nego_AcquireCredentialsHandleA(SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialUse, PLUID pLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, PVOID pGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry)
static SECURITY_STATUS SEC_ENTRY nego_CompleteAuthToken(PCtxtHandle phContext, PSecBufferDesc pToken)
static SECURITY_STATUS SEC_ENTRY nego_MakeSignature(PCtxtHandle phContext, ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo)
static SECURITY_STATUS SEC_ENTRY nego_FreeCredentialsHandle(PCredHandle phCredential)
static SECURITY_STATUS SEC_ENTRY nego_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 ntlm_QueryContextAttributesW(PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer)
SECURITY_STATUS SEC_ENTRY ntlm_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 ntlm_AcceptSecurityContext(PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, ULONG fContextReq, ULONG TargetDataRep, PCtxtHandle phNewContext, PSecBufferDesc pOutput, ULONG *pfContextAttr, PTimeStamp ptsExpiry)
SECURITY_STATUS SEC_ENTRY ntlm_QueryContextAttributesA(PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer)
SECURITY_STATUS SEC_ENTRY ntlm_VerifySignature(PCtxtHandle phContext, PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP)
SECURITY_STATUS SEC_ENTRY ntlm_FreeCredentialsHandle(PCredHandle phCredential)
SecPkgInfoW * ntlm_package_infoW
SECURITY_STATUS SEC_ENTRY ntlm_AcquireCredentialsHandleW(SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialUse, PLUID pLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, PVOID pGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry)
SECURITY_STATUS SEC_ENTRY ntlm_MakeSignature(PCtxtHandle phContext, ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo)
SECURITY_STATUS SEC_ENTRY ntlm_DecryptMessage(PCtxtHandle phContext, PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP)
SECURITY_STATUS SEC_ENTRY ntlm_EncryptMessage(PCtxtHandle phContext, ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo)
SECURITY_STATUS SEC_ENTRY ntlm_DeleteSecurityContext(PCtxtHandle phContext)
SecPkgInfoA * ntlm_package_infoA
static const SecPkgInfoW infoW
static const SecPkgInfoA infoA
static const struct @541 sizes[]
#define SECPKG_ATTR_NEGOTIATION_INFO
void(SEC_ENTRY * SEC_GET_KEY_FN)(void *Arg, void *Principal, ULONG KeyVer, void **Key, SECURITY_STATUS *Status)
#define SECPKG_ATTR_SIZES
#define SECPKG_NEGOTIATION_COMPLETE
static const WCHAR ntlmW[]
#define SEC_WINNT_AUTH_IDENTITY_UNICODE
#define SEC_WINNT_AUTH_IDENTITY_ANSI
#define RPC_C_AUTHN_GSS_NEGOTIATE
SecureProvider * SECUR32_addProvider(const SecurityFunctionTableA *fnTableA, const SecurityFunctionTableW *fnTableW, PCWSTR moduleName) DECLSPEC_HIDDEN
void SECUR32_addPackages(SecureProvider *provider, ULONG toAdd, const SecPkgInfoA *infoA, const SecPkgInfoW *infoW) DECLSPEC_HIDDEN
SECURITY_STATUS WINAPI FreeContextBuffer(PVOID pv)
int no_cached_credentials
#define SEC_E_INVALID_HANDLE
#define SEC_E_UNSUPPORTED_FUNCTION
#define SEC_E_INSUFFICIENT_MEMORY