Proposal Details
This is an offshoot of discussion on #74922.
crypto/tls.QUICConn can report errors occurring during the TLS handshake in several places:
QUICConn.Start returns an error if the handshake cannot be started.
QUICConn.HandleData returns an error if processing data from the peer causes a handshake error.
QUICConn.SendSessionTicket and QUICConn.StoreSession also return errors.
If errors can occur at points in the handshake other than during these functions, there is no way for QUICConn to report them.
The proposal is to add an additional way to report TLS errors. We add an Err field to QUICEvent, and produce an event with a type of QUICNoEvent and the Err field set when an error occurs:
type QUICEvent struct {
// Set for QUICNoEvent
Err error
// existing fields as-is
}
const (
// QUICNoEvent indicates that there are no events available.
// QUICEvent.Err is set if the connection has encountered a fatal error.
QUICNoEvent QUICEventKind = iota
)
An open question is what, if any, errors would be reported via this mechanism. It would be nice to have one concrete example of an error that we currently can't repor.
Proposal Details
This is an offshoot of discussion on #74922.
crypto/tls.QUICConncan report errors occurring during the TLS handshake in several places:QUICConn.Startreturns an error if the handshake cannot be started.QUICConn.HandleDatareturns an error if processing data from the peer causes a handshake error.QUICConn.SendSessionTicketandQUICConn.StoreSessionalso return errors.If errors can occur at points in the handshake other than during these functions, there is no way for
QUICConnto report them.The proposal is to add an additional way to report TLS errors. We add an
Errfield toQUICEvent, and produce an event with a type ofQUICNoEventand theErrfield set when an error occurs:An open question is what, if any, errors would be reported via this mechanism. It would be nice to have one concrete example of an error that we currently can't repor.