Commit b5b097fd authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Fix CryptProtectData tests on older Windows versions.

parent 10b7b81e
...@@ -69,11 +69,16 @@ static void test_cryptprotectdata(void) ...@@ -69,11 +69,16 @@ static void test_cryptprotectdata(void)
/* without entropy */ /* without entropy */
SetLastError(0xDEADBEEF); SetLastError(0xDEADBEEF);
protected = pCryptProtectData(&plain,desc,NULL,NULL,NULL,0,&cipher); protected = pCryptProtectData(&plain,desc,NULL,NULL,NULL,0,&cipher);
ok(protected, "Encrypting without entropy.\n"); ok(protected ||
r = GetLastError(); broken(!protected), /* Win9x/NT4 */
ok(r == ERROR_SUCCESS || "Encrypting without entropy.\n");
r == ERROR_IO_PENDING, /* win2k */ if (protected)
"Expected ERROR_SUCCESS or ERROR_IO_PENDING, got %d\n",r); {
r = GetLastError();
ok(r == ERROR_SUCCESS ||
r == ERROR_IO_PENDING, /* win2k */
"Expected ERROR_SUCCESS or ERROR_IO_PENDING, got %d\n",r);
}
cipher_entropy.pbData=NULL; cipher_entropy.pbData=NULL;
cipher_entropy.cbData=0; cipher_entropy.cbData=0;
...@@ -81,7 +86,9 @@ static void test_cryptprotectdata(void) ...@@ -81,7 +86,9 @@ static void test_cryptprotectdata(void)
/* with entropy */ /* with entropy */
SetLastError(0xDEADBEEF); SetLastError(0xDEADBEEF);
protected = pCryptProtectData(&plain,desc,&entropy,NULL,NULL,0,&cipher_entropy); protected = pCryptProtectData(&plain,desc,&entropy,NULL,NULL,0,&cipher_entropy);
ok(protected, "Encrypting with entropy.\n"); ok(protected ||
broken(!protected), /* Win9x/NT4 */
"Encrypting with entropy.\n");
cipher_no_desc.pbData=NULL; cipher_no_desc.pbData=NULL;
cipher_no_desc.cbData=0; cipher_no_desc.cbData=0;
......
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