Skip to content

Comments

WinTLS: Rewrite writeData#772

Merged
tatsuhiro-t merged 1 commit intomasterfrom
refactor-wintls-write
Nov 23, 2016
Merged

WinTLS: Rewrite writeData#772
tatsuhiro-t merged 1 commit intomasterfrom
refactor-wintls-write

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