• Adam Langley's avatar
    crypto/tls: ignore empty TLS records. · a1dbfee1
    Adam Langley authored
    OpenSSL can be configured to send empty records in order to randomise
    the CBC IV. This is an early version of 1/n-1 record splitting (that Go
    does) and is quite reasonable, but it results in tls.Conn.Read
    returning (0, nil).
    
    This change ignores up to 100 consecutive, empty records to avoid
    returning (0, nil) to callers.
    
    Fixes 5309.
    
    R=golang-dev, r, minux.ma
    CC=golang-dev
    https://golang.org/cl/8852044
    a1dbfee1
conn.go 22.8 KB