[Bug 20748] chromium's net_unittests!SSLClientSocketTest.Read_Interrupted fails.

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Nov 19 06:53:16 CST 2009


http://bugs.winehq.org/show_bug.cgi?id=20748





--- Comment #6 from Hans Leidekker <hans at meelstraat.net>  2009-11-19 06:53:15 ---
Created an attachment (id=24832)
 --> (http://bugs.winehq.org/attachment.cgi?id=24832)
secur32: Use an empty buffer to return decrypted data.

A look at the chromium source was revealing:

int SSLClientSocketWin::DoPayloadDecrypt() {
[...]
    for (int i = 1; i < 4; i++) {
      switch (buffers[i].BufferType) {
        case SECBUFFER_DATA:
          DCHECK(!decrypted_ptr_ && bytes_decrypted_ == 0);
          decrypted_ptr_ = static_cast<char*>(buffers[i].pvBuffer);
          bytes_decrypted_ = buffers[i].cbBuffer;
          break;
        case SECBUFFER_EXTRA:
          DCHECK(!received_ptr_ && bytes_received_ == 0);
          received_ptr_ = static_cast<char*>(buffers[i].pvBuffer);
          bytes_received_ = buffers[i].cbBuffer;
          break;
        default:
          break;
      }
    }

It starts the loop at 1, so the code does not even look at the first
buffer, even though DecryptMessage will decrypt the buffer in-place.

This patch uses an empty SecBuffer to return another pointer to the
decrypted data, which makes the unit test happy.

You need to apply this patch from bug 20622 first:
http://bugs.winehq.org/attachment.cgi?id=24819

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list