crypt32/tests: Make the msg tests usable on win9x (avoid crash)

Detlef Riekenberg at
Sun Jul 20 07:37:15 CDT 2008

First of all:  crypt32 is cryptic
- Empty lines between test-blocks would make it much more readable
- The ERROR_* codes in the Header are decimal.
  Print the value from GetLastError() as hex is a bad idea, but print
  the value as hex without an "0x"-prefix makes it stupid, when you are
  not familiar with the code.

The current code crashed on win9x:
- pvCtrlPara in CryptMsgControl is referenced without validation (!
  for the first test (dwCtrlType == CMSG_CTRL_VERIFY_SIGNATURE)
  =>  I did not care abot other dwCtrlTypes and skip the whole test

- CryptAcquireContextW is not implemented in advapi32 on win9x,
  and that results in failed and crashed tests.
  => I used the current code to detect nt/win9x
  => For the tests, i changed them to use CryptAcquireContextA

Is there any special reason to use CryptAcquireContextW in the tests?
CryptAcquireContextA works fine on win98se, w2k and Wine

crypt32/tests: Make the msg tests usable on win9x

By by ... Detlef

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-crypt32-tests-Make-the-msg-tests-usable-on-win9x.txt
Type: application/mbox
Size: 0 bytes
Desc: not available
Url : 

More information about the wine-patches mailing list