qtls: only attempt 0-RTT resumption for 0-RTT enabled session tickets (#4183)

This commit is contained in:
Marten Seemann
2023-12-09 19:47:47 +05:30
committed by GitHub
parent 38eafe4ad8
commit d234d62d52
7 changed files with 135 additions and 25 deletions

View File

@@ -93,7 +93,11 @@ func SetupConfigForServer(qconf *QUICConfig, _ bool, getData func() []byte, hand
}
}
func SetupConfigForClient(qconf *QUICConfig, getData func() []byte, setData func([]byte) bool) {
func SetupConfigForClient(
qconf *QUICConfig,
getData func(earlyData bool) []byte,
setData func(data []byte, earlyData bool) (allowEarlyData bool),
) {
conf := qconf.TLSConfig
if conf.ClientSessionCache != nil {
origCache := conf.ClientSessionCache