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

@@ -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