• Adam Langley's avatar
    crypto/tls: buffer handshake messages. · 2a8c81ff
    Adam Langley authored
    This change causes TLS handshake messages to be buffered and written in
    a single Write to the underlying net.Conn.
    
    There are two reasons to want to do this:
    
    Firstly, it's slightly preferable to do this in order to save sending
    several, small packets over the network where a single one will do.
    
    Secondly, since 37c28759 errors from
    Write have been returned from a handshake. This means that, if a peer
    closes the connection during a handshake, a “broken pipe” error may
    result from tls.Conn.Handshake(). This can mask any, more detailed,
    fatal alerts that the peer may have sent because a read will never
    happen.
    
    Buffering handshake messages means that the peer will not receive, and
    possibly reject, any of a flow while it's still being written.
    
    Fixes #15709
    
    Change-Id: I38dcff1abecc06e52b2de647ea98713ce0fb9a21
    Reviewed-on: https://go-review.googlesource.com/23609Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
    Run-TryBot: Andrew Gerrand <adg@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    2a8c81ff
Name
Last commit
Last update
..
aes Loading commit data...
cipher Loading commit data...
des Loading commit data...
dsa Loading commit data...
ecdsa Loading commit data...
elliptic Loading commit data...
hmac Loading commit data...
md5 Loading commit data...
rand Loading commit data...
rc4 Loading commit data...
rsa Loading commit data...
sha1 Loading commit data...
sha256 Loading commit data...
sha512 Loading commit data...
subtle Loading commit data...
tls Loading commit data...
x509 Loading commit data...
crypto.go Loading commit data...