interop: fix setting of cipher suite for the ChaCha20 test (#3747)

This commit is contained in:
Marten Seemann 2023-04-19 15:29:10 +02:00 committed by GitHub
parent 2359407e11
commit a753cb13d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -18,6 +18,7 @@ import (
"github.com/quic-go/quic-go/http3"
"github.com/quic-go/quic-go/internal/handshake"
"github.com/quic-go/quic-go/internal/protocol"
"github.com/quic-go/quic-go/internal/qtls"
"github.com/quic-go/quic-go/interop/http09"
"github.com/quic-go/quic-go/interop/utils"
"github.com/quic-go/quic-go/qlog"
@ -90,7 +91,8 @@ func runTestcase(testcase string) error {
case "keyupdate":
handshake.KeyUpdateInterval = 100
case "chacha20":
tlsConf.CipherSuites = []uint16{tls.TLS_CHACHA20_POLY1305_SHA256}
reset := qtls.SetCipherSuite(tls.TLS_CHACHA20_POLY1305_SHA256)
defer reset()
case "multiconnect":
return runMultiConnectTest(r, urls)
case "versionnegotiation":

View file

@ -10,6 +10,7 @@ import (
"github.com/quic-go/quic-go"
"github.com/quic-go/quic-go/http3"
"github.com/quic-go/quic-go/internal/qtls"
"github.com/quic-go/quic-go/interop/http09"
"github.com/quic-go/quic-go/interop/utils"
"github.com/quic-go/quic-go/qlog"
@ -64,7 +65,8 @@ func main() {
case "versionnegotiation", "handshake", "retry", "transfer", "resumption", "multiconnect":
err = runHTTP09Server(quicConf)
case "chacha20":
tlsConf.CipherSuites = []uint16{tls.TLS_CHACHA20_POLY1305_SHA256}
reset := qtls.SetCipherSuite(tls.TLS_CHACHA20_POLY1305_SHA256)
defer reset()
err = runHTTP09Server(quicConf)
case "http3":
err = runHTTP3Server(quicConf)