forked from quic-go/quic-go
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user