* also send session ticket when 0-RTT is disabled for go1.21
* allow session ticket without transport parameters
* do not include transport parameters for non-0RTT session ticket
* remove the test assertion because it is not supported for go1.20
* Update internal/handshake/session_ticket.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* add a 0-RTT argument to unmarshaling session tickets
* bump sessionTicketRevision to 4
* check if non-0-RTT session ticket has expected length
* change parameter order
* add test checks
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
The speedup comes from multiple sources:
1. We now preallocate a byte slice, instead of appending multiple times.
2. Marshaling into a byte slice is faster than using a bytes.Buffer.
3. quicvarint.Write allocates, while quicvarint.Append doesn't.
Application data is now retrieved and restored via two callbacks on the
qtls.Config. This allows us the get rid of the rather complex wrapping
of the qtls.ClientSessionCache. Furthermore, it makes sure that we only
restore the application data when qtls decides to actually use the
ticket.