8000 WinTLS: Rewrite writeData by tatsuhiro-t · Pull Request #772 · aria2/aria2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

WinTLS: Rewrite writeData #772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 23, 2016
Merged

WinTLS: Rewrite writeData #772

merged 1 commit into from
Nov 23, 2016

Conversation

tatsuhiro-t
Copy link
Collaborator

We re-wrote WinTLSSession::writeData. The major points are:

  • Buffer is now preallocated once handshake is finished. Previously,
    they are allocated each time when we send one TLS record.

  • Schannel uses header, body and trailer for each secBuffer. Now we
    send them off at once using WSASend which is windows counterpart of
    sendv. Previously, we do memmove if some of them are truncated.

  • We don't try to send application data in
    WinTLSSession::closeConnection, since semantically we need same
    application data used to create TLS record before. Using 0 length
    data to finish sending buffered data looks like a hack.

We re-wrote WinTLSSession::writeData.  The major points are:

* Buffer is now preallocated once handshake is finished.  Previously,
  they are allocated each time when we send one TLS record.

* Schannel uses header, body and trailer for each secBuffer.  Now we
  send them off at once using WSASend which is windows counterpart of
  sendv.  Previously, we do memmove if some of them are truncated.

* We don't try to send application data in
  WinTLSSession::closeConnection, since semantically we need same
  application data used to create TLS record before.  Using 0 length
  data to finish sending buffered data looks like a hack.
@tatsuhiro-t
Copy link
Collaborator Author

This will be merged in 1.30.0. We have fixed WinTLS issue in upcoming 1.29.0. We'd like to see the bug is really fixed in the 1.29.0.

@tatsuhiro-t tatsuhiro-t added this to the v1.30.0 milestone Nov 12, 2016
@tatsuhiro-t tatsuhiro-t merged commit 9df5080 into master Nov 23, 2016
@ghost ghost mentioned this pull request Nov 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0