<div dir="ltr"><div><div><div>It is definitely valid to call CryptDecrypt multiple times with the same key. Calls with Final = FALSE change the internal state of the key, calls with Final = TRUE restore the initial state. Subsequent calls with Final = TRUE should return the same result.<br>
<br></div>Your testcase fails because CryptDecrypt changes the value of dwLen, which you do not restore before calling the function again.<br><br></div>Regards,<br></div>Daniel<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/6/27 Qian Hong <span dir="ltr"><<a href="mailto:fracting@gmail.com" target="_blank">fracting@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I was investigating Bug 33898 [1] hardly and get a partial result, I<br>
have a special test case demonstrate the behavior of Aliwangwang [2],<br>
however, I failed to expand the special case to a common test case. My<br>
attempting is shown in [3]. The hack in [3] works for Aliwangwang, but<br>
the test case in [3] doesn't fully pass on Windows as I expected [4].<br>
<br>
I'm not sure if there is an APP bug rather than Wine bug here, is it<br>
valid to call multiple CryptDecrypt with only one CryptDeriveKey<br>
called? If true, is it correct to assume the second CryptDecrypt call<br>
should behavior identical as the first one?<br>
If there is a Wine bug here, what is the right way to write a common<br>
test case for it?<br>
<br>
Any hints on this bug is great appreciated!<br>
<br>
Thanks very much!<br>
<br>
[1] <a href="http://bugs.winehq.org/show_bug.cgi?id=33898" target="_blank">http://bugs.winehq.org/show_bug.cgi?id=33898</a><br>
[2] <a href="http://bugs.winehq.org/attachment.cgi?id=44996" target="_blank">http://bugs.winehq.org/attachment.cgi?id=44996</a><br>
[3] <a href="http://bugs.winehq.org/attachment.cgi?id=44997&action=diff" target="_blank">http://bugs.winehq.org/attachment.cgi?id=44997&action=diff</a><br>
[4] <a href="https://testbot.winehq.org/JobDetails.pl?Key=26138" target="_blank">https://testbot.winehq.org/JobDetails.pl?Key=26138</a><br>
<br>
--<br>
Regards,<br>
Qian Hong<br>
<br>
-<br>
<a href="http://www.winehq.org" target="_blank">http://www.winehq.org</a><br>
<br>
<br>
</blockquote></div><br></div>