What version of Go are you using (go version)?
$ go version
go version go1.21.0 darwin/arm64
Does this issue reproduce with the latest release?
Yes
What did you do?
When QUICConn.SendSessionTicket is called even though Config.SessionTicketsDisabled is set, an error is returned ("session ticket keys unavailable").
Now one could argue that the QUIC stack do that check before calling SendSessionTicket (and that's what quic-go does), however, the QUIC stack won't have access to the tls.Config used on the connection if it is a config returned by GetConfigForClient (unless the QUIC stack wraps that callback and keeps track of the invocations, which would be quite a bit of complexity).
What did you expect to see?
Instead, it would be easy for crypto/tls to check the Config.SessionTicketsDisabled flag on the config that's in use on the connection.
API-wise, there are two options here:
- return
nil
- return a sentinel error
No strong preference in either direction.
cc @neild @FiloSottile
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
Yes
What did you do?
When
QUICConn.SendSessionTicketis called even thoughConfig.SessionTicketsDisabledis set, an error is returned ("session ticket keys unavailable").Now one could argue that the QUIC stack do that check before calling
SendSessionTicket(and that's what quic-go does), however, the QUIC stack won't have access to thetls.Configused on the connection if it is a config returned byGetConfigForClient(unless the QUIC stack wraps that callback and keeps track of the invocations, which would be quite a bit of complexity).What did you expect to see?
Instead, it would be easy for crypto/tls to check the
Config.SessionTicketsDisabledflag on the config that's in use on the connection.API-wise, there are two options here:
nilNo strong preference in either direction.
cc @neild @FiloSottile