Commit 57ab0cd9 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

include: sspi.h: Use the Win types as per MSDN.

This improves the Win64 compatibility.
parent 92892873
...@@ -606,7 +606,7 @@ static RPC_STATUS RPCRT4_ClientAuthorize(RpcConnection *conn, SecBuffer *in, ...@@ -606,7 +606,7 @@ static RPC_STATUS RPCRT4_ClientAuthorize(RpcConnection *conn, SecBuffer *in,
} }
} }
TRACE("cbBuffer = %ld\n", out->cbBuffer); TRACE("cbBuffer = %d\n", out->cbBuffer);
if (!continue_needed) if (!continue_needed)
{ {
......
...@@ -144,13 +144,13 @@ static void testGetInfo(void) ...@@ -144,13 +144,13 @@ static void testGetInfo(void)
/* First package: Unified */ /* First package: Unified */
status = pTables->GetInfo(&PackageInfo); status = pTables->GetInfo(&PackageInfo);
ok(status == STATUS_SUCCESS, "status: 0x%x\n", status); ok(status == STATUS_SUCCESS, "status: 0x%x\n", status);
ok(PackageInfo.fCapabilities == 0x107b3, "fCapabilities: 0x%lx\n", ok(PackageInfo.fCapabilities == 0x107b3, "fCapabilities: 0x%x\n",
PackageInfo.fCapabilities); PackageInfo.fCapabilities);
ok(PackageInfo.wVersion == 1, "wVersion: %d\n", PackageInfo.wVersion); ok(PackageInfo.wVersion == 1, "wVersion: %d\n", PackageInfo.wVersion);
ok(PackageInfo.wRPCID == 14, "wRPCID: %d\n", PackageInfo.wRPCID); ok(PackageInfo.wRPCID == 14, "wRPCID: %d\n", PackageInfo.wRPCID);
ok(PackageInfo.cbMaxToken == 0x4000 || ok(PackageInfo.cbMaxToken == 0x4000 ||
PackageInfo.cbMaxToken == 0x6000, /* Vista */ PackageInfo.cbMaxToken == 0x6000, /* Vista */
"cbMaxToken: 0x%lx\n", "cbMaxToken: 0x%x\n",
PackageInfo.cbMaxToken); PackageInfo.cbMaxToken);
/* Second package: SChannel */ /* Second package: SChannel */
...@@ -164,11 +164,11 @@ static void testGetInfo(void) ...@@ -164,11 +164,11 @@ static void testGetInfo(void)
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
{ {
ok(PackageInfo.fCapabilities == 0x107b3, "fCapabilities: 0x%lx\n", ok(PackageInfo.fCapabilities == 0x107b3, "fCapabilities: 0x%x\n",
PackageInfo.fCapabilities); PackageInfo.fCapabilities);
ok(PackageInfo.wVersion == 1, "wVersion: %d\n", PackageInfo.wVersion); ok(PackageInfo.wVersion == 1, "wVersion: %d\n", PackageInfo.wVersion);
ok(PackageInfo.wRPCID == 14, "wRPCID: %d\n", PackageInfo.wRPCID); ok(PackageInfo.wRPCID == 14, "wRPCID: %d\n", PackageInfo.wRPCID);
ok(PackageInfo.cbMaxToken == 0x4000, "cbMaxToken: 0x%lx\n", ok(PackageInfo.cbMaxToken == 0x4000, "cbMaxToken: 0x%x\n",
PackageInfo.cbMaxToken); PackageInfo.cbMaxToken);
} }
} }
......
...@@ -768,7 +768,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW( ...@@ -768,7 +768,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW(
if(pInput->pBuffers[input_token_idx].cbBuffer > max_len) if(pInput->pBuffers[input_token_idx].cbBuffer > max_len)
{ {
TRACE("pInput->pBuffers[%d].cbBuffer is: %ld\n", TRACE("pInput->pBuffers[%d].cbBuffer is: %d\n",
input_token_idx, input_token_idx,
pInput->pBuffers[input_token_idx].cbBuffer); pInput->pBuffers[input_token_idx].cbBuffer);
ret = SEC_E_INVALID_TOKEN; ret = SEC_E_INVALID_TOKEN;
......
...@@ -507,7 +507,7 @@ static void schan_resize_current_buffer(const struct schan_buffers *s, SIZE_T mi ...@@ -507,7 +507,7 @@ static void schan_resize_current_buffer(const struct schan_buffers *s, SIZE_T mi
if (!new_data) if (!new_data)
{ {
TRACE("Failed to resize %p from %ld to %ld\n", b->pvBuffer, b->cbBuffer, new_size); TRACE("Failed to resize %p from %d to %ld\n", b->pvBuffer, b->cbBuffer, new_size);
return; return;
} }
...@@ -539,7 +539,7 @@ static char *schan_get_buffer(const struct schan_transport *t, struct schan_buff ...@@ -539,7 +539,7 @@ static char *schan_get_buffer(const struct schan_transport *t, struct schan_buff
} }
buffer = &s->desc->pBuffers[s->current_buffer_idx]; buffer = &s->desc->pBuffers[s->current_buffer_idx];
TRACE("Using buffer %d: cbBuffer %ld, BufferType %#lx, pvBuffer %p\n", s->current_buffer_idx, buffer->cbBuffer, buffer->BufferType, buffer->pvBuffer); TRACE("Using buffer %d: cbBuffer %d, BufferType %#x, pvBuffer %p\n", s->current_buffer_idx, buffer->cbBuffer, buffer->BufferType, buffer->pvBuffer);
schan_resize_current_buffer(s, s->offset + *count); schan_resize_current_buffer(s, s->offset + *count);
max_count = buffer->cbBuffer - s->offset; max_count = buffer->cbBuffer - s->offset;
...@@ -636,7 +636,7 @@ static void dump_buffer_desc(SecBufferDesc *desc) ...@@ -636,7 +636,7 @@ static void dump_buffer_desc(SecBufferDesc *desc)
for (i = 0; i < desc->cBuffers; ++i) for (i = 0; i < desc->cBuffers; ++i)
{ {
SecBuffer *b = &desc->pBuffers[i]; SecBuffer *b = &desc->pBuffers[i];
TRACE("\tbuffer %u: cbBuffer %ld, BufferType %#lx pvBuffer %p\n", i, b->cbBuffer, b->BufferType, b->pvBuffer); TRACE("\tbuffer %u: cbBuffer %d, BufferType %#x pvBuffer %p\n", i, b->cbBuffer, b->BufferType, b->pvBuffer);
} }
} }
......
...@@ -447,7 +447,7 @@ static SECURITY_STATUS runClient(SspiData *sspi_data, BOOL first, ULONG data_rep ...@@ -447,7 +447,7 @@ static SECURITY_STATUS runClient(SspiData *sspi_data, BOOL first, ULONG data_rep
ok(ret == SEC_E_BUFFER_TOO_SMALL, "expected SEC_E_BUFFER_TOO_SMALL, got %s\n", getSecError(ret)); ok(ret == SEC_E_BUFFER_TOO_SMALL, "expected SEC_E_BUFFER_TOO_SMALL, got %s\n", getSecError(ret));
ok(out_buf->pBuffers[0].cbBuffer == 0, ok(out_buf->pBuffers[0].cbBuffer == 0,
"InitializeSecurityContext set buffer size to %lu\n", out_buf->pBuffers[0].cbBuffer); "InitializeSecurityContext set buffer size to %u\n", out_buf->pBuffers[0].cbBuffer);
out_buf->pBuffers[0].cbBuffer = sspi_data->max_token; out_buf->pBuffers[0].cbBuffer = sspi_data->max_token;
out_buf->pBuffers[0].BufferType = SECBUFFER_DATA; out_buf->pBuffers[0].BufferType = SECBUFFER_DATA;
...@@ -476,9 +476,9 @@ static SECURITY_STATUS runClient(SspiData *sspi_data, BOOL first, ULONG data_rep ...@@ -476,9 +476,9 @@ static SECURITY_STATUS runClient(SspiData *sspi_data, BOOL first, ULONG data_rep
} }
ok(out_buf->pBuffers[0].BufferType == SECBUFFER_TOKEN, ok(out_buf->pBuffers[0].BufferType == SECBUFFER_TOKEN,
"buffer type was changed from SECBUFFER_TOKEN to %ld\n", out_buf->pBuffers[0].BufferType); "buffer type was changed from SECBUFFER_TOKEN to %d\n", out_buf->pBuffers[0].BufferType);
ok(out_buf->pBuffers[0].cbBuffer < sspi_data->max_token, ok(out_buf->pBuffers[0].cbBuffer < sspi_data->max_token,
"InitializeSecurityContext set buffer size to %lu\n", out_buf->pBuffers[0].cbBuffer); "InitializeSecurityContext set buffer size to %u\n", out_buf->pBuffers[0].cbBuffer);
return ret; return ret;
} }
...@@ -870,16 +870,16 @@ static void testAuth(ULONG data_rep, BOOL fake) ...@@ -870,16 +870,16 @@ static void testAuth(ULONG data_rep, BOOL fake)
"pQueryContextAttributesA(SECPKG_ATTR_SIZES) returned %s\n", "pQueryContextAttributesA(SECPKG_ATTR_SIZES) returned %s\n",
getSecError(sec_status)); getSecError(sec_status));
ok((ctxt_sizes.cbMaxToken == 1904) || (ctxt_sizes.cbMaxToken == 2888), ok((ctxt_sizes.cbMaxToken == 1904) || (ctxt_sizes.cbMaxToken == 2888),
"cbMaxToken should be 1904 or 2888 but is %lu\n", "cbMaxToken should be 1904 or 2888 but is %u\n",
ctxt_sizes.cbMaxToken); ctxt_sizes.cbMaxToken);
ok(ctxt_sizes.cbMaxSignature == 16, ok(ctxt_sizes.cbMaxSignature == 16,
"cbMaxSignature should be 16 but is %lu\n", "cbMaxSignature should be 16 but is %u\n",
ctxt_sizes.cbMaxSignature); ctxt_sizes.cbMaxSignature);
ok(ctxt_sizes.cbSecurityTrailer == 16, ok(ctxt_sizes.cbSecurityTrailer == 16,
"cbSecurityTrailer should be 16 but is %lu\n", "cbSecurityTrailer should be 16 but is %u\n",
ctxt_sizes.cbSecurityTrailer); ctxt_sizes.cbSecurityTrailer);
ok(ctxt_sizes.cbBlockSize == 0, ok(ctxt_sizes.cbBlockSize == 0,
"cbBlockSize should be 0 but is %lu\n", "cbBlockSize should be 0 but is %u\n",
ctxt_sizes.cbBlockSize); ctxt_sizes.cbBlockSize);
tAuthend: tAuthend:
......
...@@ -101,7 +101,7 @@ static void test_InitSecurityInterface(void) ...@@ -101,7 +101,7 @@ static void test_InitSecurityInterface(void)
sftA = pInitSecurityInterfaceA(); sftA = pInitSecurityInterfaceA();
ok(sftA != NULL, "pInitSecurityInterfaceA failed\n"); ok(sftA != NULL, "pInitSecurityInterfaceA failed\n");
ok(sftA->dwVersion == SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION, "wrong dwVersion %ld in security function table\n", sftA->dwVersion); ok(sftA->dwVersion == SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION, "wrong dwVersion %d in security function table\n", sftA->dwVersion);
ok(!sftA->Reserved2, "Reserved2 should be NULL instead of %p in security function table\n", sftA->Reserved2); ok(!sftA->Reserved2, "Reserved2 should be NULL instead of %p in security function table\n", sftA->Reserved2);
ok(sftA->Reserved3 == sftA->EncryptMessage, "Reserved3 should be equal to EncryptMessage in the security function table\n"); ok(sftA->Reserved3 == sftA->EncryptMessage, "Reserved3 should be equal to EncryptMessage in the security function table\n");
ok(sftA->Reserved4 == sftA->DecryptMessage, "Reserved4 should be equal to DecryptMessage in the security function table\n"); ok(sftA->Reserved4 == sftA->DecryptMessage, "Reserved4 should be equal to DecryptMessage in the security function table\n");
...@@ -114,7 +114,7 @@ static void test_InitSecurityInterface(void) ...@@ -114,7 +114,7 @@ static void test_InitSecurityInterface(void)
sftW = pInitSecurityInterfaceW(); sftW = pInitSecurityInterfaceW();
ok(sftW != NULL, "pInitSecurityInterfaceW failed\n"); ok(sftW != NULL, "pInitSecurityInterfaceW failed\n");
ok(sftW->dwVersion == SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION, "wrong dwVersion %ld in security function table\n", sftW->dwVersion); ok(sftW->dwVersion == SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION, "wrong dwVersion %d in security function table\n", sftW->dwVersion);
ok(!sftW->Reserved2, "Reserved2 should be NULL instead of %p in security function table\n", sftW->Reserved2); ok(!sftW->Reserved2, "Reserved2 should be NULL instead of %p in security function table\n", sftW->Reserved2);
ok(sftW->Reserved3 == sftW->EncryptMessage, "Reserved3 should be equal to EncryptMessage in the security function table\n"); ok(sftW->Reserved3 == sftW->EncryptMessage, "Reserved3 should be equal to EncryptMessage in the security function table\n");
ok(sftW->Reserved4 == sftW->DecryptMessage, "Reserved4 should be equal to DecryptMessage in the security function table\n"); ok(sftW->Reserved4 == sftW->DecryptMessage, "Reserved4 should be equal to DecryptMessage in the security function table\n");
......
...@@ -89,20 +89,20 @@ typedef UNICODE_STRING SECURITY_STRING, *PSECURITY_STRING; ...@@ -89,20 +89,20 @@ typedef UNICODE_STRING SECURITY_STRING, *PSECURITY_STRING;
typedef struct _SecPkgInfoA typedef struct _SecPkgInfoA
{ {
unsigned long fCapabilities; ULONG fCapabilities;
unsigned short wVersion; USHORT wVersion;
unsigned short wRPCID; USHORT wRPCID;
unsigned long cbMaxToken; ULONG cbMaxToken;
SEC_CHAR *Name; SEC_CHAR *Name;
SEC_CHAR *Comment; SEC_CHAR *Comment;
} SecPkgInfoA, *PSecPkgInfoA; } SecPkgInfoA, *PSecPkgInfoA;
typedef struct _SecPkgInfoW typedef struct _SecPkgInfoW
{ {
unsigned long fCapabilities; ULONG fCapabilities;
unsigned short wVersion; USHORT wVersion;
unsigned short wRPCID; USHORT wRPCID;
unsigned long cbMaxToken; ULONG cbMaxToken;
SEC_WCHAR *Name; SEC_WCHAR *Name;
SEC_WCHAR *Comment; SEC_WCHAR *Comment;
} SecPkgInfoW, *PSecPkgInfoW; } SecPkgInfoW, *PSecPkgInfoW;
...@@ -133,9 +133,9 @@ typedef struct _SecPkgInfoW ...@@ -133,9 +133,9 @@ typedef struct _SecPkgInfoW
typedef struct _SecBuffer typedef struct _SecBuffer
{ {
unsigned long cbBuffer; ULONG cbBuffer;
unsigned long BufferType; ULONG BufferType;
void *pvBuffer; PVOID pvBuffer;
} SecBuffer, *PSecBuffer; } SecBuffer, *PSecBuffer;
/* values for BufferType */ /* values for BufferType */
...@@ -162,8 +162,8 @@ typedef struct _SecBuffer ...@@ -162,8 +162,8 @@ typedef struct _SecBuffer
typedef struct _SecBufferDesc typedef struct _SecBufferDesc
{ {
unsigned long ulVersion; ULONG ulVersion;
unsigned long cBuffers; ULONG cBuffers;
PSecBuffer pBuffers; PSecBuffer pBuffers;
} SecBufferDesc, *PSecBufferDesc; } SecBufferDesc, *PSecBufferDesc;
...@@ -434,19 +434,19 @@ typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CONTEXT_ATTRIBUTES_FN_W)(PCtxtHandle, ...@@ -434,19 +434,19 @@ typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CONTEXT_ATTRIBUTES_FN_W)(PCtxtHandle,
typedef struct _SecPkgContext_Sizes typedef struct _SecPkgContext_Sizes
{ {
unsigned long cbMaxToken; ULONG cbMaxToken;
unsigned long cbMaxSignature; ULONG cbMaxSignature;
unsigned long cbBlockSize; ULONG cbBlockSize;
unsigned long cbSecurityTrailer; ULONG cbSecurityTrailer;
} SecPkgContext_Sizes, *PSecPkgContext_Sizes; } SecPkgContext_Sizes, *PSecPkgContext_Sizes;
typedef struct _SecPkgContext_StreamSizes typedef struct _SecPkgContext_StreamSizes
{ {
unsigned long cbHeader; ULONG cbHeader;
unsigned long cbTrailer; ULONG cbTrailer;
unsigned long cbMaximumMessage; ULONG cbMaximumMessage;
unsigned long cbBuffers; ULONG cbBuffers;
unsigned long cbBlockSize; ULONG cbBlockSize;
} SecPkgContext_StreamSizes, *PSecPkgContext_StreamSizes; } SecPkgContext_StreamSizes, *PSecPkgContext_StreamSizes;
typedef struct _SecPkgContext_NamesA typedef struct _SecPkgContext_NamesA
...@@ -470,26 +470,26 @@ typedef struct _SecPkgContext_Lifespan ...@@ -470,26 +470,26 @@ typedef struct _SecPkgContext_Lifespan
typedef struct _SecPkgContext_DceInfo typedef struct _SecPkgContext_DceInfo
{ {
unsigned long AuthzSvc; ULONG AuthzSvc;
void *pPac; PVOID pPac;
} SecPkgContext_DceInfo, *PSecPkgContext_DceInfo; } SecPkgContext_DceInfo, *PSecPkgContext_DceInfo;
typedef struct _SecPkgContext_KeyInfoA typedef struct _SecPkgContext_KeyInfoA
{ {
SEC_CHAR *sSignatureAlgorithmName; SEC_CHAR *sSignatureAlgorithmName;
SEC_CHAR *sEncryptAlgorithmName; SEC_CHAR *sEncryptAlgorithmName;
unsigned long KeySize; ULONG KeySize;
unsigned long SignatureAlgorithm; ULONG SignatureAlgorithm;
unsigned long EncryptAlgorithm; ULONG EncryptAlgorithm;
} SecPkgContext_KeyInfoA, *PSecPkgContext_KeyInfoA; } SecPkgContext_KeyInfoA, *PSecPkgContext_KeyInfoA;
typedef struct _SecPkgContext_KeyInfoW typedef struct _SecPkgContext_KeyInfoW
{ {
SEC_WCHAR *sSignatureAlgorithmName; SEC_WCHAR *sSignatureAlgorithmName;
SEC_WCHAR *sEncryptAlgorithmName; SEC_WCHAR *sEncryptAlgorithmName;
unsigned long KeySize; ULONG KeySize;
unsigned long SignatureAlgorithm; ULONG SignatureAlgorithm;
unsigned long EncryptAlgorithm; ULONG EncryptAlgorithm;
} SecPkgContext_KeyInfoW, *PSecPkgContext_KeyInfoW; } SecPkgContext_KeyInfoW, *PSecPkgContext_KeyInfoW;
#define SecPkgContext_KeyInfo WINELIB_NAME_AW(SecPkgContext_KeyInfo) #define SecPkgContext_KeyInfo WINELIB_NAME_AW(SecPkgContext_KeyInfo)
...@@ -511,15 +511,15 @@ typedef struct _SecPkgContext_AuthorityW ...@@ -511,15 +511,15 @@ typedef struct _SecPkgContext_AuthorityW
typedef struct _SecPkgContext_ProtoInfoA typedef struct _SecPkgContext_ProtoInfoA
{ {
SEC_CHAR *sProtocolName; SEC_CHAR *sProtocolName;
unsigned long majorVersion; ULONG majorVersion;
unsigned long minorVersion; ULONG minorVersion;
} SecPkgContext_ProtoInfoA, *PSecPkgContext_ProtoInfoA; } SecPkgContext_ProtoInfoA, *PSecPkgContext_ProtoInfoA;
typedef struct _SecPkgContext_ProtoInfoW typedef struct _SecPkgContext_ProtoInfoW
{ {
SEC_WCHAR *sProtocolName; SEC_WCHAR *sProtocolName;
unsigned long majorVersion; ULONG majorVersion;
unsigned long minorVersion; ULONG minorVersion;
} SecPkgContext_ProtoInfoW, *PSecPkgContext_ProtoInfoW; } SecPkgContext_ProtoInfoW, *PSecPkgContext_ProtoInfoW;
#define SecPkgContext_ProtoInfo WINELIB_NAME_AW(SecPkgContext_ProtoInfo) #define SecPkgContext_ProtoInfo WINELIB_NAME_AW(SecPkgContext_ProtoInfo)
...@@ -742,7 +742,7 @@ typedef SECURITY_STATUS (SEC_ENTRY *SET_CONTEXT_ATTRIBUTES_FN_W)(PCtxtHandle, ...@@ -742,7 +742,7 @@ typedef SECURITY_STATUS (SEC_ENTRY *SET_CONTEXT_ATTRIBUTES_FN_W)(PCtxtHandle,
typedef struct _SECURITY_FUNCTION_TABLE_A typedef struct _SECURITY_FUNCTION_TABLE_A
{ {
unsigned long dwVersion; ULONG dwVersion;
ENUMERATE_SECURITY_PACKAGES_FN_A EnumerateSecurityPackagesA; ENUMERATE_SECURITY_PACKAGES_FN_A EnumerateSecurityPackagesA;
QUERY_CREDENTIALS_ATTRIBUTES_FN_A QueryCredentialsAttributesA; QUERY_CREDENTIALS_ATTRIBUTES_FN_A QueryCredentialsAttributesA;
ACQUIRE_CREDENTIALS_HANDLE_FN_A AcquireCredentialsHandleA; ACQUIRE_CREDENTIALS_HANDLE_FN_A AcquireCredentialsHandleA;
...@@ -774,7 +774,7 @@ typedef struct _SECURITY_FUNCTION_TABLE_A ...@@ -774,7 +774,7 @@ typedef struct _SECURITY_FUNCTION_TABLE_A
typedef struct _SECURITY_FUNCTION_TABLE_W typedef struct _SECURITY_FUNCTION_TABLE_W
{ {
unsigned long dwVersion; ULONG dwVersion;
ENUMERATE_SECURITY_PACKAGES_FN_W EnumerateSecurityPackagesW; ENUMERATE_SECURITY_PACKAGES_FN_W EnumerateSecurityPackagesW;
QUERY_CREDENTIALS_ATTRIBUTES_FN_W QueryCredentialsAttributesW; QUERY_CREDENTIALS_ATTRIBUTES_FN_W QueryCredentialsAttributesW;
ACQUIRE_CREDENTIALS_HANDLE_FN_W AcquireCredentialsHandleW; ACQUIRE_CREDENTIALS_HANDLE_FN_W AcquireCredentialsHandleW;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment