Commit 0884bca0 authored by Filippo Valsorda's avatar Filippo Valsorda

crypto/tls: move shared code and resources to handshake_test.go

Removed cross-dependencies between handshake_server_test.go and
handshake_client_test.go; moved all initialization to TestMain; replaced
SSLKEYLOGFILE environment variable with -keylog flag.

Change-Id: Ida6712daa44e01a2c00658e8a1896087ee88bcb0
Reviewed-on: https://go-review.googlesource.com/c/go/+/183057
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarAdam Langley <agl@golang.org>
parent bc81f52e
...@@ -25,18 +25,6 @@ import ( ...@@ -25,18 +25,6 @@ import (
"time" "time"
) )
func init() {
// TLS 1.3 cipher suites preferences are not configurable and change based
// on the architecture. Force them to the version with AES acceleration for
// test consistency.
once.Do(initDefaultCipherSuites)
varDefaultCipherSuitesTLS13 = []uint16{
TLS_AES_128_GCM_SHA256,
TLS_CHACHA20_POLY1305_SHA256,
TLS_AES_256_GCM_SHA384,
}
}
// Note: see comment in handshake_test.go for details of how the reference // Note: see comment in handshake_test.go for details of how the reference
// tests work. // tests work.
...@@ -287,8 +275,6 @@ func (test *clientTest) loadData() (flows [][]byte, err error) { ...@@ -287,8 +275,6 @@ func (test *clientTest) loadData() (flows [][]byte, err error) {
} }
func (test *clientTest) run(t *testing.T, write bool) { func (test *clientTest) run(t *testing.T, write bool) {
checkOpenSSLVersion(t)
var clientConn, serverConn net.Conn var clientConn, serverConn net.Conn
var recordingConn *recordingConn var recordingConn *recordingConn
var childProcess *exec.Cmd var childProcess *exec.Cmd
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment