Commit 2d18c3aa authored by Michael Jung's avatar Michael Jung Committed by Alexandre Julliard

It's sufficienct for Crypt[Un]ProtectData to acquire the crypto

context with the CRYPT_VERIFY_CONTEXT flag set.
parent 5d16ab67
...@@ -861,8 +861,7 @@ BOOL WINAPI CryptProtectData(DATA_BLOB* pDataIn, ...@@ -861,8 +861,7 @@ BOOL WINAPI CryptProtectData(DATA_BLOB* pDataIn,
szDataDescr=(WCHAR[]){'\0'}; szDataDescr=(WCHAR[]){'\0'};
/* get crypt context */ /* get crypt context */
if (!CryptAcquireContextW(&hProv,NULL,NULL,CRYPT32_PROTECTDATA_PROV,0) && if (!CryptAcquireContextW(&hProv,NULL,NULL,CRYPT32_PROTECTDATA_PROV,CRYPT_VERIFYCONTEXT))
!CryptAcquireContextW(&hProv,NULL,NULL,CRYPT32_PROTECTDATA_PROV,CRYPT_NEWKEYSET))
{ {
ERR("CryptAcquireContextW failed\n"); ERR("CryptAcquireContextW failed\n");
goto finished; goto finished;
...@@ -1043,8 +1042,7 @@ BOOL WINAPI CryptUnprotectData(DATA_BLOB* pDataIn, ...@@ -1043,8 +1042,7 @@ BOOL WINAPI CryptUnprotectData(DATA_BLOB* pDataIn,
} }
/* get a crypt context */ /* get a crypt context */
if (!CryptAcquireContextW(&hProv,NULL,NULL,CRYPT32_PROTECTDATA_PROV,0) && if (!CryptAcquireContextW(&hProv,NULL,NULL,CRYPT32_PROTECTDATA_PROV,CRYPT_VERIFYCONTEXT))
!CryptAcquireContextW(&hProv,NULL,NULL,CRYPT32_PROTECTDATA_PROV,CRYPT_NEWKEYSET))
{ {
ERR("CryptAcquireContextW failed\n"); ERR("CryptAcquireContextW failed\n");
goto free_protect_data; goto free_protect_data;
......
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