secur32/tests: Win64 printf format warning fixes.
This commit is contained in:
parent
b6a9109c03
commit
4b7877d79d
|
@ -4,7 +4,6 @@ SRCDIR = @srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
TESTDLL = secur32.dll
|
TESTDLL = secur32.dll
|
||||||
IMPORTS = crypt32 advapi32 kernel32
|
IMPORTS = crypt32 advapi32 kernel32
|
||||||
EXTRADEFS = -DWINE_NO_LONG_AS_INT
|
|
||||||
|
|
||||||
CTESTS = \
|
CTESTS = \
|
||||||
main.c \
|
main.c \
|
||||||
|
|
|
@ -98,7 +98,7 @@ static const char* getSecError(SECURITY_STATUS status)
|
||||||
_SEC_ERR(SEC_E_NO_CREDENTIALS);
|
_SEC_ERR(SEC_E_NO_CREDENTIALS);
|
||||||
_SEC_ERR(SEC_E_OUT_OF_SEQUENCE);
|
_SEC_ERR(SEC_E_OUT_OF_SEQUENCE);
|
||||||
default:
|
default:
|
||||||
sprintf(buf, "%08lx\n", status);
|
sprintf(buf, "%08x\n", status);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
#undef _SEC_ERR
|
#undef _SEC_ERR
|
||||||
|
@ -140,18 +140,18 @@ static void testEnumerateSecurityPackages(void)
|
||||||
sec_status = pEnumerateSecurityPackagesA(&num_packages, &pkg_info);
|
sec_status = pEnumerateSecurityPackagesA(&num_packages, &pkg_info);
|
||||||
|
|
||||||
ok(sec_status == SEC_E_OK,
|
ok(sec_status == SEC_E_OK,
|
||||||
"EnumerateSecurityPackages() should return %ld, not %08lx\n",
|
"EnumerateSecurityPackages() should return %d, not %08x\n",
|
||||||
(LONG)SEC_E_OK, (LONG)sec_status);
|
SEC_E_OK, sec_status);
|
||||||
|
|
||||||
ok(num_packages > 0, "Number of sec packages should be > 0 ,but is %ld\n",
|
ok(num_packages > 0, "Number of sec packages should be > 0 ,but is %d\n",
|
||||||
num_packages);
|
num_packages);
|
||||||
|
|
||||||
ok(pkg_info != NULL,
|
ok(pkg_info != NULL,
|
||||||
"pkg_info should not be NULL after EnumerateSecurityPackages\n");
|
"pkg_info should not be NULL after EnumerateSecurityPackages\n");
|
||||||
|
|
||||||
trace("Number of packages: %ld\n", num_packages);
|
trace("Number of packages: %d\n", num_packages);
|
||||||
for(i = 0; i < num_packages; ++i){
|
for(i = 0; i < num_packages; ++i){
|
||||||
trace("%ld: Package \"%s\"\n", i, pkg_info[i].Name);
|
trace("%d: Package \"%s\"\n", i, pkg_info[i].Name);
|
||||||
trace("Supported flags:\n");
|
trace("Supported flags:\n");
|
||||||
if(pkg_info[i].fCapabilities & SECPKG_FLAG_INTEGRITY)
|
if(pkg_info[i].fCapabilities & SECPKG_FLAG_INTEGRITY)
|
||||||
trace("\tSECPKG_FLAG_INTEGRITY\n");
|
trace("\tSECPKG_FLAG_INTEGRITY\n");
|
||||||
|
|
|
@ -179,7 +179,7 @@ static const char* getSecError(SECURITY_STATUS status)
|
||||||
_SEC_ERR(SEC_E_OUT_OF_SEQUENCE);
|
_SEC_ERR(SEC_E_OUT_OF_SEQUENCE);
|
||||||
_SEC_ERR(SEC_E_MESSAGE_ALTERED);
|
_SEC_ERR(SEC_E_MESSAGE_ALTERED);
|
||||||
default:
|
default:
|
||||||
sprintf(buf, "%08lx\n", status);
|
sprintf(buf, "%08x\n", status);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
#undef _SEC_ERR
|
#undef _SEC_ERR
|
||||||
|
|
|
@ -139,18 +139,18 @@ static void testAcquireSecurityContext(void)
|
||||||
st = pAcquireCredentialsHandleA(NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL,
|
st = pAcquireCredentialsHandleA(NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL,
|
||||||
NULL);
|
NULL);
|
||||||
ok(st == SEC_E_SECPKG_NOT_FOUND,
|
ok(st == SEC_E_SECPKG_NOT_FOUND,
|
||||||
"Expected SEC_E_SECPKG_NOT_FOUND, got %08lx\n", st);
|
"Expected SEC_E_SECPKG_NOT_FOUND, got %08x\n", st);
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, 0, NULL, NULL, NULL,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, 0, NULL, NULL, NULL,
|
||||||
NULL, NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08lx\n",
|
ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08x\n",
|
||||||
st);
|
st);
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_BOTH, NULL,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_BOTH, NULL,
|
||||||
NULL, NULL, NULL, NULL, NULL);
|
NULL, NULL, NULL, NULL, NULL);
|
||||||
ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08lx\n",
|
ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08x\n",
|
||||||
st);
|
st);
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08lx\n",
|
ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08x\n",
|
||||||
st);
|
st);
|
||||||
/* Crashes
|
/* Crashes
|
||||||
st = pAcquireCredentialsHandleA(NULL, UNISP_NAME_A, SECPKG_CRED_OUTBOUND,
|
st = pAcquireCredentialsHandleA(NULL, UNISP_NAME_A, SECPKG_CRED_OUTBOUND,
|
||||||
|
@ -158,12 +158,12 @@ static void testAcquireSecurityContext(void)
|
||||||
*/
|
*/
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||||
NULL, NULL, NULL, NULL, &cred, NULL);
|
NULL, NULL, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", st);
|
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st);
|
||||||
pFreeCredentialsHandle(&cred);
|
pFreeCredentialsHandle(&cred);
|
||||||
memset(&cred, 0, sizeof(cred));
|
memset(&cred, 0, sizeof(cred));
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||||
NULL, NULL, NULL, NULL, &cred, &exp);
|
NULL, NULL, NULL, NULL, &cred, &exp);
|
||||||
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", st);
|
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st);
|
||||||
ok(exp.HighPart == 0 && exp.LowPart == 0,
|
ok(exp.HighPart == 0 && exp.LowPart == 0,
|
||||||
"Expected 0 expiry, got %08lx%08lx\n", exp.HighPart, exp.LowPart);
|
"Expected 0 expiry, got %08lx%08lx\n", exp.HighPart, exp.LowPart);
|
||||||
pFreeCredentialsHandle(&cred);
|
pFreeCredentialsHandle(&cred);
|
||||||
|
@ -172,23 +172,23 @@ static void testAcquireSecurityContext(void)
|
||||||
memset(&schanCred, 0, sizeof(schanCred));
|
memset(&schanCred, 0, sizeof(schanCred));
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, NULL, NULL);
|
NULL, &schanCred, NULL, NULL, NULL, NULL);
|
||||||
ok(st == SEC_E_INTERNAL_ERROR, "Expected SEC_E_INTERNAL_ERROR, got %08lx\n",
|
ok(st == SEC_E_INTERNAL_ERROR, "Expected SEC_E_INTERNAL_ERROR, got %08x\n",
|
||||||
st);
|
st);
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, NULL, NULL);
|
NULL, &schanCred, NULL, NULL, NULL, NULL);
|
||||||
ok(st == SEC_E_INTERNAL_ERROR, "Expected SEC_E_INTERNAL_ERROR, got %08lx\n",
|
ok(st == SEC_E_INTERNAL_ERROR, "Expected SEC_E_INTERNAL_ERROR, got %08x\n",
|
||||||
st);
|
st);
|
||||||
|
|
||||||
/* No cert in SCHANNEL_CRED succeeds for outbound.. */
|
/* No cert in SCHANNEL_CRED succeeds for outbound.. */
|
||||||
schanCred.dwVersion = SCHANNEL_CRED_VERSION;
|
schanCred.dwVersion = SCHANNEL_CRED_VERSION;
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", st);
|
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st);
|
||||||
pFreeCredentialsHandle(&cred);
|
pFreeCredentialsHandle(&cred);
|
||||||
/* but fails for inbound. */
|
/* but fails for inbound. */
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, NULL, NULL);
|
NULL, &schanCred, NULL, NULL, NULL, NULL);
|
||||||
ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08lx\n",
|
ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08x\n",
|
||||||
st);
|
st);
|
||||||
|
|
||||||
/* Crashes with bad paCred pointer
|
/* Crashes with bad paCred pointer
|
||||||
|
@ -205,12 +205,12 @@ static void testAcquireSecurityContext(void)
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, NULL, NULL);
|
NULL, &schanCred, NULL, NULL, NULL, NULL);
|
||||||
ok(st == SEC_E_UNKNOWN_CREDENTIALS || SEC_E_NO_CREDENTIALS,
|
ok(st == SEC_E_UNKNOWN_CREDENTIALS || SEC_E_NO_CREDENTIALS,
|
||||||
"Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_NO_CREDENTIALS, got %08lx\n",
|
"Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_NO_CREDENTIALS, got %08x\n",
|
||||||
st);
|
st);
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, NULL, NULL);
|
NULL, &schanCred, NULL, NULL, NULL, NULL);
|
||||||
ok(st == SEC_E_UNKNOWN_CREDENTIALS || SEC_E_NO_CREDENTIALS,
|
ok(st == SEC_E_UNKNOWN_CREDENTIALS || SEC_E_NO_CREDENTIALS,
|
||||||
"Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_NO_CREDENTIALS, got %08lx\n",
|
"Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_NO_CREDENTIALS, got %08x\n",
|
||||||
st);
|
st);
|
||||||
|
|
||||||
/* Good cert, but missing private key. Windows fails with
|
/* Good cert, but missing private key. Windows fails with
|
||||||
|
@ -221,12 +221,12 @@ static void testAcquireSecurityContext(void)
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_UNKNOWN_CREDENTIALS || SEC_E_NO_CREDENTIALS,
|
ok(st == SEC_E_UNKNOWN_CREDENTIALS || SEC_E_NO_CREDENTIALS,
|
||||||
"Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_NO_CREDENTIALS, got %08lx\n",
|
"Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_NO_CREDENTIALS, got %08x\n",
|
||||||
st);
|
st);
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, NULL, NULL);
|
NULL, &schanCred, NULL, NULL, NULL, NULL);
|
||||||
ok(st == SEC_E_UNKNOWN_CREDENTIALS || SEC_E_NO_CREDENTIALS,
|
ok(st == SEC_E_UNKNOWN_CREDENTIALS || SEC_E_NO_CREDENTIALS,
|
||||||
"Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_NO_CREDENTIALS, got %08lx\n",
|
"Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_NO_CREDENTIALS, got %08x\n",
|
||||||
st);
|
st);
|
||||||
|
|
||||||
/* Good cert, with CRYPT_KEY_PROV_INFO set before it's had a key loaded. */
|
/* Good cert, with CRYPT_KEY_PROV_INFO set before it's had a key loaded. */
|
||||||
|
@ -236,17 +236,17 @@ static void testAcquireSecurityContext(void)
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_UNKNOWN_CREDENTIALS,
|
ok(st == SEC_E_UNKNOWN_CREDENTIALS,
|
||||||
"Expected SEC_E_UNKNOWN_CREDENTIALS, got %08lx\n", st);
|
"Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st);
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_UNKNOWN_CREDENTIALS,
|
ok(st == SEC_E_UNKNOWN_CREDENTIALS,
|
||||||
"Expected SEC_E_UNKNOWN_CREDENTIALS, got %08lx\n", st);
|
"Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st);
|
||||||
|
|
||||||
ret = CryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL,
|
ret = CryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL,
|
||||||
CRYPT_NEWKEYSET);
|
CRYPT_NEWKEYSET);
|
||||||
ok(ret, "CryptAcquireContextW failed: %08lx\n", GetLastError());
|
ok(ret, "CryptAcquireContextW failed: %08x\n", GetLastError());
|
||||||
ret = CryptImportKey(csp, (LPBYTE)privKey, sizeof(privKey), 0, 0, &key);
|
ret = CryptImportKey(csp, (LPBYTE)privKey, sizeof(privKey), 0, 0, &key);
|
||||||
ok(ret, "CryptImportKey failed: %08lx\n", GetLastError());
|
ok(ret, "CryptImportKey failed: %08x\n", GetLastError());
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
PCCERT_CONTEXT tmp;
|
PCCERT_CONTEXT tmp;
|
||||||
|
@ -260,39 +260,39 @@ static void testAcquireSecurityContext(void)
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_INTERNAL_ERROR,
|
ok(st == SEC_E_INTERNAL_ERROR,
|
||||||
"Expected SEC_E_INTERNAL_ERROR, got %08lx\n", st);
|
"Expected SEC_E_INTERNAL_ERROR, got %08x\n", st);
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_INTERNAL_ERROR,
|
ok(st == SEC_E_INTERNAL_ERROR,
|
||||||
"Expected SEC_E_INTERNAL_ERROR, got %08lx\n", st);
|
"Expected SEC_E_INTERNAL_ERROR, got %08x\n", st);
|
||||||
schanCred.dwVersion = SCH_CRED_V2;
|
schanCred.dwVersion = SCH_CRED_V2;
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_INTERNAL_ERROR,
|
ok(st == SEC_E_INTERNAL_ERROR,
|
||||||
"Expected SEC_E_INTERNAL_ERROR, got %08lx\n", st);
|
"Expected SEC_E_INTERNAL_ERROR, got %08x\n", st);
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_INTERNAL_ERROR,
|
ok(st == SEC_E_INTERNAL_ERROR,
|
||||||
"Expected SEC_E_INTERNAL_ERROR, got %08lx\n", st);
|
"Expected SEC_E_INTERNAL_ERROR, got %08x\n", st);
|
||||||
|
|
||||||
/* Succeeds on V3 or higher */
|
/* Succeeds on V3 or higher */
|
||||||
schanCred.dwVersion = SCH_CRED_V3;
|
schanCred.dwVersion = SCH_CRED_V3;
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", st);
|
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st);
|
||||||
pFreeCredentialsHandle(&cred);
|
pFreeCredentialsHandle(&cred);
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", st);
|
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st);
|
||||||
pFreeCredentialsHandle(&cred);
|
pFreeCredentialsHandle(&cred);
|
||||||
schanCred.dwVersion = SCHANNEL_CRED_VERSION;
|
schanCred.dwVersion = SCHANNEL_CRED_VERSION;
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", st);
|
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st);
|
||||||
pFreeCredentialsHandle(&cred);
|
pFreeCredentialsHandle(&cred);
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", st);
|
ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st);
|
||||||
pFreeCredentialsHandle(&cred);
|
pFreeCredentialsHandle(&cred);
|
||||||
|
|
||||||
/* How about more than one cert? */
|
/* How about more than one cert? */
|
||||||
|
@ -301,22 +301,22 @@ static void testAcquireSecurityContext(void)
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_UNKNOWN_CREDENTIALS,
|
ok(st == SEC_E_UNKNOWN_CREDENTIALS,
|
||||||
"Expected SEC_E_UNKNOWN_CREDENTIALS, got %08lx\n", st);
|
"Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st);
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_UNKNOWN_CREDENTIALS,
|
ok(st == SEC_E_UNKNOWN_CREDENTIALS,
|
||||||
"Expected SEC_E_UNKNOWN_CREDENTIALS, got %08lx\n", st);
|
"Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st);
|
||||||
tmp = certs[0];
|
tmp = certs[0];
|
||||||
certs[0] = certs[1];
|
certs[0] = certs[1];
|
||||||
certs[1] = tmp;
|
certs[1] = tmp;
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_UNKNOWN_CREDENTIALS,
|
ok(st == SEC_E_UNKNOWN_CREDENTIALS,
|
||||||
"Expected SEC_E_UNKNOWN_CREDENTIALS, got %08lx\n", st);
|
"Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st);
|
||||||
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND,
|
||||||
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
NULL, &schanCred, NULL, NULL, &cred, NULL);
|
||||||
ok(st == SEC_E_UNKNOWN_CREDENTIALS,
|
ok(st == SEC_E_UNKNOWN_CREDENTIALS,
|
||||||
"Expected SEC_E_UNKNOWN_CREDENTIALS, got %08lx\n", st);
|
"Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st);
|
||||||
/* FIXME: what about two valid certs? */
|
/* FIXME: what about two valid certs? */
|
||||||
|
|
||||||
CryptDestroyKey(key);
|
CryptDestroyKey(key);
|
||||||
|
|
|
@ -53,7 +53,7 @@ static void testGetComputerObjectNameA(void)
|
||||||
(GetLastError() == ERROR_INVALID_PARAMETER)) ||
|
(GetLastError() == ERROR_INVALID_PARAMETER)) ||
|
||||||
(GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO) ||
|
(GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO) ||
|
||||||
(GetLastError() == ERROR_NO_SUCH_DOMAIN),
|
(GetLastError() == ERROR_NO_SUCH_DOMAIN),
|
||||||
"GetComputerObjectNameA(%d) failed: %ld\n",
|
"GetComputerObjectNameA(%d) failed: %d\n",
|
||||||
formats[i], GetLastError());
|
formats[i], GetLastError());
|
||||||
if (rc)
|
if (rc)
|
||||||
trace("GetComputerObjectNameA() returned %s\n", name);
|
trace("GetComputerObjectNameA() returned %s\n", name);
|
||||||
|
@ -75,7 +75,7 @@ static void testGetComputerObjectNameW(void)
|
||||||
(GetLastError() == ERROR_INVALID_PARAMETER)) ||
|
(GetLastError() == ERROR_INVALID_PARAMETER)) ||
|
||||||
(GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO) ||
|
(GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO) ||
|
||||||
(GetLastError() == ERROR_NO_SUCH_DOMAIN),
|
(GetLastError() == ERROR_NO_SUCH_DOMAIN),
|
||||||
"GetComputerObjectNameW(%d) failed: %ld\n",
|
"GetComputerObjectNameW(%d) failed: %d\n",
|
||||||
formats[i], GetLastError());
|
formats[i], GetLastError());
|
||||||
if (rc) {
|
if (rc) {
|
||||||
char name[256];
|
char name[256];
|
||||||
|
|
Loading…
Reference in New Issue