Hi Mounir,
+ case PP_KEYSTORAGE: + dwTemp = CRYPT_SEC_DESCR;
This looks fine..
+ result = CryptGetProvParam(prov, PP_KEYSTORAGE, (LPBYTE)&dwParam, &dataLen, 0); + ok(result && dataLen == sizeof(dwParam) && (dwParam == CRYPT_SEC_DESCR), + "Expected CRYPT_SEC_DESCR to be set, got 0x%08X\n",dwParam);
but this test will now fail on Win9x, yes?
A simple fix would be to check (dwParam & CRYPT_SEC_DESCR) rather than (dwParam == CRYPT_SEC_DESCR).
--Juan
____________________________________________________________________________________ Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html
For CRYPT_SEC_DESCR, my previous implementation of the patch tested for it with an "&" as you are suggesting. But, after Alexandre Julliard comment, I no more check the current version of windows and return always CRYPT_SEC_DESCR in RSAENH_CPGetProvParam. So, that's why I put an "==" instead to stick with wine implementation. Well, I think the two views are equivalent even if my first patch containing the version check seemed more logical to me but ,as I am new to wine, I prefer following the advise of more experienced wine developers. Question: are wine tests meant to be run on Windows? This is the only case for the test to fail.
Cheers, Mounir IDRASSI IDRIX - Cryptography and IT Security Experts http://www.idrix.fr
Juan Lang wrote:
Hi Mounir,
case PP_KEYSTORAGE:
dwTemp = CRYPT_SEC_DESCR;
This looks fine..
- result = CryptGetProvParam(prov, PP_KEYSTORAGE, (LPBYTE)&dwParam,
&dataLen, 0);
- ok(result && dataLen == sizeof(dwParam) && (dwParam ==
CRYPT_SEC_DESCR),
"Expected CRYPT_SEC_DESCR to be set, got 0x%08X\n",dwParam);
but this test will now fail on Win9x, yes?
A simple fix would be to check (dwParam & CRYPT_SEC_DESCR) rather than (dwParam == CRYPT_SEC_DESCR).
--Juan
Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html
Hi again Mounir,
For CRYPT_SEC_DESCR, my previous implementation of the patch tested for it with an "&" as you are suggesting. But, after Alexandre Julliard comment, I no more check the current version of windows and return always CRYPT_SEC_DESCR in RSAENH_CPGetProvParam. So, that's why I put an "==" instead to stick with wine implementation.
The "&" you used before checked the Windows version in rsaenh.dll, and produced different results based on that. We avoid making our DLLs behave differently based on Windows version, unless applications also expect differing behavior based on Windows versions. Your change in the DLL (not in the tests) appears sound.
The "&" I am suggesting is to allow the test to succeed on WinXP and Wine -- where PP_KEYSTORAGE returns precisely CRYPT_SEC_DESCR -- and on Win9x -- where PP_KEYSTORAGE returns CRYPT_SEC_DESCR | other flags we don't care to emulate.
Question: are wine tests meant to be run on Windows? This is the only case for the test to fail.
Yes, certainly. See e.g. recent patches from Paul Vriens to get the tests succeeding on Win9x. --Juan
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Hi Juan, Thanks for your explanations. I'm resubmitting the patch.
Mounir IDRASSI IDRIX - Cryptography and IT Security Experts http://www.idrix.fr
Juan Lang wrote:
Yes, certainly. See e.g. recent patches from Paul Vriens to get the tests succeeding on Win9x. --Juan