]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/crypto/tls/quic_test.go
crypto/tls: add QUIC 0-RTT APIs
[gostls13.git] / src / crypto / tls / quic_test.go
index 58054de80d4fb6bbd28a5237da95c300acad0533..02503cff828fc6aa20218bf0500dbbd6b9bf8880 100644 (file)
@@ -85,7 +85,8 @@ func (q *testQUICConn) setWriteSecret(level QUICEncryptionLevel, suite uint16, s
 
 var errTransportParametersRequired = errors.New("transport parameters required")
 
-func runTestQUICConnection(ctx context.Context, a, b *testQUICConn, onHandleCryptoData func()) error {
+func runTestQUICConnection(ctx context.Context, cli, srv *testQUICConn, onHandleCryptoData func()) error {
+       a, b := cli, srv
        for _, c := range []*testQUICConn{a, b} {
                if !c.conn.conn.quic.started {
                        if err := c.conn.Start(ctx); err != nil {
@@ -123,6 +124,11 @@ func runTestQUICConnection(ctx context.Context, a, b *testQUICConn, onHandleCryp
                        return errTransportParametersRequired
                case QUICHandshakeDone:
                        a.complete = true
+                       if a == srv {
+                               if err := srv.conn.SendSessionTicket(false); err != nil {
+                                       return err
+                               }
+                       }
                }
                if e.Kind != QUICNoEvent {
                        idleCount = 0