34#define NEGOTIATE_BASE_CAPS ( \
35 SECPKG_FLAG_INTEGRITY | \
36 SECPKG_FLAG_PRIVACY | \
37 SECPKG_FLAG_CONNECTION | \
38 SECPKG_FLAG_MULTI_REQUIRED | \
39 SECPKG_FLAG_EXTENDED_ERROR | \
40 SECPKG_FLAG_IMPERSONATION | \
41 SECPKG_FLAG_ACCEPT_WIN32_NAME | \
42 SECPKG_FLAG_NEGOTIABLE | \
43 SECPKG_FLAG_GSS_COMPATIBLE | \
46#define NTLM_BASE_CAPS ( \
47 SECPKG_FLAG_INTEGRITY | \
48 SECPKG_FLAG_PRIVACY | \
49 SECPKG_FLAG_TOKEN_ONLY | \
50 SECPKG_FLAG_CONNECTION | \
51 SECPKG_FLAG_MULTI_REQUIRED | \
52 SECPKG_FLAG_IMPERSONATION | \
53 SECPKG_FLAG_ACCEPT_WIN32_NAME | \
54 SECPKG_FLAG_NEGOTIABLE | \
73 for (
i = 0;
i <
data->in_buf->cBuffers; ++
i)
80 for (
i = 0;
i <
data->out_buf->cBuffers; ++
i)
96 data->in_buf->cBuffers = 1;
106 data->out_buf->cBuffers = 1;
120 trace(
"setting up client\n" );
140 trace(
"setting up server\n" );
160 trace(
"running client for the %s time\n",
first ?
"first" :
"second" );
162 data->out_buf->pBuffers[0].cbBuffer =
data->max_token;
177 "buffer type changed from SECBUFFER_TOKEN to %u\n",
data->out_buf->pBuffers[0].BufferType );
178 ok(
data->out_buf->pBuffers[0].cbBuffer <
data->max_token,
179 "InitializeSecurityContext didn't change buffer size\n" );
189 trace(
"running server for the %s time\n",
first ?
"first" :
"second" );
207 trace(
"running communicate\n" );
209 memcpy( to->
in_buf->pBuffers[0].pvBuffer,
from->out_buf->pBuffers[0].pvBuffer,
210 from->out_buf->pBuffers[0].cbBuffer );
211 to->
in_buf->pBuffers[0].cbBuffer =
from->out_buf->pBuffers[0].cbBuffer;
212 memset(
from->out_buf->pBuffers[0].pvBuffer, 0,
from->max_token );
229 id.User = (
unsigned char *)
"user";
230 id.UserLength =
strlen(
"user" );
231 id.Domain = (
unsigned char *)
"domain";
232 id.DomainLength =
strlen(
"domain" );
233 id.Password = (
unsigned char *)
"password";
234 id.PasswordLength =
strlen(
"password" );
240 skip(
"setup_client returned %08x, skipping test\n",
status );
245 skip(
"setup_server returned %08x, skipping test\n",
status );
254 "client returned %08x, more tests will fail\n", status_c );
261 "server returned %08x, more tests will fail\n", status_s );
269 skip(
"authentication failed, skipping remaining tests\n" );
273 sizes.cbMaxToken = 0xdeadbeef;
274 sizes.cbMaxSignature = 0xdeadbeef;
275 sizes.cbSecurityTrailer = 0xdeadbeef;
276 sizes.cbBlockSize = 0xdeadbeef;
278 ok( status_c ==
SEC_E_OK,
"pQueryContextAttributesA returned %08x\n", status_c );
279 ok(
sizes.cbMaxToken == 2888 ||
sizes.cbMaxToken == 1904,
280 "expected 2888 or 1904, got %u\n",
sizes.cbMaxToken );
281 ok(
sizes.cbMaxSignature == 16,
"expected 16, got %u\n",
sizes.cbMaxSignature );
282 ok(
sizes.cbSecurityTrailer == 16,
"expected 16, got %u\n",
sizes.cbSecurityTrailer );
283 ok( !
sizes.cbBlockSize,
"expected 0, got %u\n",
sizes.cbBlockSize );
287 ok( status_c ==
SEC_E_OK,
"QueryContextAttributesA returned %08x\n", status_c );
291 ok(
pi !=
NULL,
"expected non-NULL PackageInfo\n" );
304 "got %08x\n",
pi->fCapabilities );
305 ok(
pi->wVersion == 1,
"got %u\n",
pi->wVersion );
313 ok(
pi->Name +
lstrlenA(
pi->Name) < eob,
"Name doesn't fit into allocated block\n" );
314 ok(
pi->Comment +
lstrlenA(
pi->Comment) < eob,
"Comment doesn't fit into allocated block\n" );
327 ok( status_c ==
SEC_E_OK,
"DeleteSecurityContext returned %08x\n", status_c );
333 ok( status_s ==
SEC_E_OK,
"DeleteSecurityContext returned %08x\n", status_s );
339 ok( status_c ==
SEC_E_OK,
"FreeCredentialsHandle returned %08x\n", status_c );
345 ok( status_s ==
SEC_E_OK,
"FreeCredentialsHandle returned %08x\n", status_s );
355 ok( 0,
"Negotiate package not installed, skipping test\n" );
363 "got %08x\n",
info->fCapabilities );
364 ok(
info->wVersion == 1,
"got %u\n",
info->wVersion );
ACPI_SIZE strlen(const char *String)
#define HeapFree(x, y, z)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
static void test_authentication(void)
static SECURITY_STATUS run_server(struct sspi_data *data, BOOL first)
static void cleanup_buffers(struct sspi_data *data)
static SECURITY_STATUS setup_client(struct sspi_data *data, SEC_CHAR *provider)
#define NEGOTIATE_BASE_CAPS
static void setup_buffers(struct sspi_data *data, SecPkgInfoA *info)
static SECURITY_STATUS run_client(struct sspi_data *data, BOOL first)
static void communicate(struct sspi_data *from, struct sspi_data *to)
static SECURITY_STATUS setup_server(struct sspi_data *data, SEC_CHAR *provider)
static const struct @541 sizes[]
#define SECPKG_FLAG_APPCONTAINER_CHECKS
#define SECPKG_CRED_OUTBOUND
#define SECURITY_NETWORK_DREP
#define SECPKG_FLAG_RESTRICTED_TOKENS
#define SECPKG_ATTR_NEGOTIATION_INFO
#define SECPKG_FLAG_APPLY_LOOPBACK
#define SECPKG_CRED_INBOUND
#define SECPKG_ATTR_SIZES
#define SECPKG_NEGOTIATION_COMPLETE
#define SECPKG_FLAG_READONLY_WITH_CHECKSUM
#define SECBUFFER_VERSION
#define SEC_WINNT_AUTH_IDENTITY_ANSI
#define RPC_C_AUTHN_WINNT
#define RPC_C_AUTHN_GSS_NEGOTIATE
SECURITY_STATUS WINAPI FreeContextBuffer(PVOID pv)
PSEC_WINNT_AUTH_IDENTITY_A id
static rfbScreenInfoPtr server
SIZE_T WINAPI HeapSize(HANDLE, DWORD, LPCVOID)
#define SEC_E_LOGON_DENIED
#define SEC_I_COMPLETE_NEEDED
#define SEC_I_CONTINUE_NEEDED
#define SEC_I_COMPLETE_AND_CONTINUE
SECURITY_STATUS WINAPI CompleteAuthToken(PCtxtHandle phContext, PSecBufferDesc pToken)
SECURITY_STATUS WINAPI QueryContextAttributesA(PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer)
SECURITY_STATUS WINAPI AcceptSecurityContext(PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, ULONG fContextReq, ULONG TargetDataRep, PCtxtHandle phNewContext, PSecBufferDesc pOutput, ULONG *pfContextAttr, PTimeStamp ptsExpiry)
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)
SECURITY_STATUS WINAPI 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 WINAPI DeleteSecurityContext(PCtxtHandle phContext)
SECURITY_STATUS WINAPI FreeCredentialsHandle(PCredHandle phCredential)
SECURITY_STATUS WINAPI QuerySecurityPackageInfoA(SEC_CHAR *pszPackageName, PSecPkgInfoA *ppPackageInfo)