Commit 0c8ce3aa authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

crypt32/tests: Fix test failures under newer Windows versions.

parent 35886486
......@@ -3886,17 +3886,19 @@ static void testAcquireCertPrivateKey(void)
/* Missing private key */
ret = pCryptAcquireCertificatePrivateKey(cert, 0, NULL, &csp, NULL, NULL);
ok(!ret && GetLastError() == CRYPT_E_NO_KEY_PROPERTY,
ok(!ret && (GetLastError() == CRYPT_E_NO_KEY_PROPERTY || GetLastError() == NTE_BAD_PROV_TYPE /* win10 */),
"Expected CRYPT_E_NO_KEY_PROPERTY, got %08x\n", GetLastError());
ret = pCryptAcquireCertificatePrivateKey(cert, 0, NULL, &csp, &keySpec,
&callerFree);
ok(!ret && GetLastError() == CRYPT_E_NO_KEY_PROPERTY,
ok(!ret && (GetLastError() == CRYPT_E_NO_KEY_PROPERTY || GetLastError() == NTE_BAD_PROV_TYPE /* win10 */),
"Expected CRYPT_E_NO_KEY_PROPERTY, got %08x\n", GetLastError());
CertSetCertificateContextProperty(cert, CERT_KEY_PROV_INFO_PROP_ID, 0,
&keyProvInfo);
ret = pCryptAcquireCertificatePrivateKey(cert, 0, NULL, &csp, &keySpec,
&callerFree);
ok(!ret && (GetLastError() == CRYPT_E_NO_KEY_PROPERTY || GetLastError() == NTE_BAD_KEYSET /* win8 */),
ok(!ret && (GetLastError() == CRYPT_E_NO_KEY_PROPERTY ||
GetLastError() == NTE_BAD_KEYSET /* win8 */ ||
GetLastError() == NTE_BAD_PROV_TYPE /* win10 */),
"Expected CRYPT_E_NO_KEY_PROPERTY, got %08x\n", GetLastError());
pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL,
......
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