diff --git a/.github/workflows/cross-compile.yml b/.github/workflows/cross-compile.yml index 042953f8c50..46309b0ae7e 100644 --- a/.github/workflows/cross-compile.yml +++ b/.github/workflows/cross-compile.yml @@ -4,7 +4,7 @@ jobs: strategy: fail-fast: false matrix: - go: [ "1.20.x", "1.21.0-rc.3" ] + go: [ "1.20.x", "1.21.x" ] runs-on: ${{ fromJSON(vars['CROSS_COMPILE_RUNNER_UBUNTU'] || '"ubuntu-latest"') }} name: "Cross Compilation (Go ${{matrix.go}})" steps: diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 362a24ecb9c..7ad8f5bab7d 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -5,7 +5,7 @@ jobs: strategy: fail-fast: false matrix: - go: [ "1.20.x", "1.21.0-rc.3" ] + go: [ "1.20.x", "1.21.x" ] runs-on: ${{ fromJSON(vars['INTEGRATION_RUNNER_UBUNTU'] || '"ubuntu-latest"') }} env: DEBUG: false # set this to true to export qlogs and save them as artifacts diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index fb21749fc17..c9eff032476 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -7,7 +7,7 @@ jobs: fail-fast: false matrix: os: [ "ubuntu", "windows", "macos" ] - go: [ "1.20.x", "1.21.0-rc.3" ] + go: [ "1.20.x", "1.21.x" ] runs-on: ${{ fromJSON(vars[format('UNIT_RUNNER_{0}', matrix.os)] || format('"{0}-latest"', matrix.os)) }} name: Unit tests (${{ matrix.os}}, Go ${{ matrix.go }}) steps: diff --git a/internal/handshake/crypto_setup.go b/internal/handshake/crypto_setup.go index 543e70e0f0b..35d65b5eecb 100644 --- a/internal/handshake/crypto_setup.go +++ b/internal/handshake/crypto_setup.go @@ -359,7 +359,7 @@ func (h *cryptoSetup) GetSessionTicket() ([]byte, error) { if h.tlsConf.SessionTicketsDisabled { return nil, nil } - if err := h.conn.SendSessionTicket(h.allow0RTT); err != nil { + if err := qtls.SendSessionTicket(h.conn, h.allow0RTT); err != nil { return nil, err } ev := h.conn.NextEvent() diff --git a/internal/qtls/go120.go b/internal/qtls/go120.go index 595e6e663ba..3b50441c47c 100644 --- a/internal/qtls/go120.go +++ b/internal/qtls/go120.go @@ -139,3 +139,7 @@ func SetCipherSuite(id uint16) (reset func()) { cipherSuitesModified = false } } + +func SendSessionTicket(c *QUICConn, allow0RTT bool) error { + return c.SendSessionTicket(allow0RTT) +} diff --git a/internal/qtls/go121.go b/internal/qtls/go121.go index 1137556e6a4..4aebc4a14c3 100644 --- a/internal/qtls/go121.go +++ b/internal/qtls/go121.go @@ -11,12 +11,13 @@ import ( ) type ( - QUICConn = tls.QUICConn - QUICConfig = tls.QUICConfig - QUICEvent = tls.QUICEvent - QUICEventKind = tls.QUICEventKind - QUICEncryptionLevel = tls.QUICEncryptionLevel - AlertError = tls.AlertError + QUICConn = tls.QUICConn + QUICConfig = tls.QUICConfig + QUICEvent = tls.QUICEvent + QUICEventKind = tls.QUICEventKind + QUICEncryptionLevel = tls.QUICEncryptionLevel + QUICSessionTicketOptions = tls.QUICSessionTicketOptions + AlertError = tls.AlertError ) const ( @@ -152,3 +153,9 @@ func findExtraData(extras [][]byte) []byte { } return nil } + +func SendSessionTicket(c *QUICConn, allow0RTT bool) error { + return c.SendSessionTicket(tls.QUICSessionTicketOptions{ + EarlyData: allow0RTT, + }) +}