From 55d7da4bae527ca73c570d2b232abf682471ed9e Mon Sep 17 00:00:00 2001 From: Reece Dunn Date: Wed, 23 Jul 2008 01:34:49 +0100 Subject: [PATCH] crypt32/tests: check Vista error codes for the protectdata tests. --- dlls/crypt32/tests/protectdata.c | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/dlls/crypt32/tests/protectdata.c b/dlls/crypt32/tests/protectdata.c index b77b81b..f084f70 100644 --- a/dlls/crypt32/tests/protectdata.c +++ b/dlls/crypt32/tests/protectdata.c @@ -84,8 +84,9 @@ static void test_cryptprotectdata(void) ok(protected, "Encrypting with entropy.\n"); r = GetLastError(); ok(r == ERROR_SUCCESS || - r == ERROR_IO_PENDING, /* win2k */ - "Expected ERROR_SUCCESS or ERROR_IO_PENDING, got %d\n",r); + r == ERROR_IO_PENDING /* win2k */ || + r == 0xdeadbeef /* Vista */, + "Expected ERROR_SUCCESS or ERROR_IO_PENDING or 0xdeadbeef, got %d\n",r); cipher_no_desc.pbData=NULL; cipher_no_desc.cbData=0; @@ -98,7 +99,8 @@ static void test_cryptprotectdata(void) r = GetLastError(); if (protected) { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(r == ERROR_SUCCESS || r == 0xdeadbeef /* Vista */, + "Expected ERROR_SUCCESS or 0xdeadbeef, got %d\n", r); } else { @@ -159,7 +161,8 @@ static void test_cryptunprotectdata(void) okay = pCryptUnprotectData(&cipher,&data_desc,NULL,NULL,NULL,0,&plain); ok(okay,"Decrypting without entropy\n"); r = GetLastError(); - ok(r == ERROR_SUCCESS, "Wrong (%u) GetLastError seen\n",r); + ok(r == ERROR_SUCCESS || r == 0xdeadbeef /* Vista */, + "Expected ERROR_SUCCESS or 0xdeadbeef, got %d\n", r); ok(plain.pbData!=NULL,"Plain DATA_BLOB missing data\n"); ok(plain.cbData==strlen(secret)+1,"Plain DATA_BLOB wrong length\n"); @@ -186,7 +189,8 @@ static void test_cryptunprotectdata(void) okay = pCryptUnprotectData(&cipher_entropy,&data_desc,&entropy,NULL,NULL,0,&plain); ok(okay,"Decrypting with entropy\n"); r = GetLastError(); - ok(r == ERROR_SUCCESS, "Wrong (%u) GetLastError seen\n",r); + ok(r == ERROR_SUCCESS || r == 0xdeadbeef /* Vista */, + "Expected ERROR_SUCCESS or 0xdeadbeef, got %d\n", r); ok(plain.pbData!=NULL,"Plain DATA_BLOB missing data\n"); ok(plain.cbData==strlen(secret)+1,"Plain DATA_BLOB wrong length\n"); @@ -206,7 +210,8 @@ static void test_cryptunprotectdata(void) okay = pCryptUnprotectData(&cipher_no_desc,&data_desc,&entropy,NULL,NULL,0,&plain); ok(okay,"Decrypting with entropy and no description\n"); r = GetLastError(); - ok(r == ERROR_SUCCESS, "Wrong (%u) GetLastError seen\n",r); + ok(r == ERROR_SUCCESS || r == 0xdeadbeef /* Vista */, + "Expected ERROR_SUCCESS or 0xdeadbeef, got %d\n", r); ok(plain.pbData!=NULL,"Plain DATA_BLOB missing data\n"); ok(plain.cbData==strlen(secret2)+1,"Plain DATA_BLOB wrong length\n"); -- 1.5.6.1.1071.g76fb