ci: use Go 1.23rc2 for unit and integration tests (#4571)

* ci: use Go 1.23rc1 for unit and integration tests

* handshake: avoid using linkname to access crypto/tls.cipherSuiteTLS13ByID

* ci: use use Go 1.23rc2
This commit is contained in:
Marten Seemann
2024-07-18 11:20:54 -06:00
committed by GitHub
parent b52c33939d
commit 7825250d3f
3 changed files with 15 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ jobs:
fail-fast: false
matrix:
os: [ "ubuntu" ]
go: [ "1.21.x", "1.22.x" ]
go: [ "1.21.x", "1.22.x", "1.23.0-rc.2" ]
include:
- os: "windows"
go: "1.21.x"

View File

@@ -7,7 +7,7 @@ jobs:
fail-fast: false
matrix:
os: [ "ubuntu", "windows", "macos" ]
go: [ "1.21.x", "1.22.x" ]
go: [ "1.21.x", "1.22.x", "1.23.0-rc.2" ]
runs-on: ${{ fromJSON(vars[format('UNIT_RUNNER_{0}', matrix.os)] || format('"{0}-latest"', matrix.os)) }}
name: Unit tests (${{ matrix.os}}, Go ${{ matrix.go }})
timeout-minutes: 30

View File

@@ -5,7 +5,7 @@ import (
"crypto/cipher"
"crypto/tls"
"testing"
_ "unsafe"
"unsafe"
"golang.org/x/exp/rand"
@@ -20,8 +20,18 @@ type cipherSuiteTLS13 struct {
Hash crypto.Hash
}
//go:linkname cipherSuiteTLS13ByID crypto/tls.cipherSuiteTLS13ByID
func cipherSuiteTLS13ByID(id uint16) *cipherSuiteTLS13
//go:linkname cipherSuitesTLS13 crypto/tls.cipherSuitesTLS13
var cipherSuitesTLS13 []unsafe.Pointer
func cipherSuiteTLS13ByID(id uint16) *cipherSuiteTLS13 {
for _, v := range cipherSuitesTLS13 {
cs := (*cipherSuiteTLS13)(v)
if cs.ID == id {
return cs
}
}
return nil
}
//go:linkname expandLabel crypto/tls.(*cipherSuiteTLS13).expandLabel
func expandLabel(cs *cipherSuiteTLS13, secret []byte, label string, context []byte, length int) []byte