]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: rework reference tests.
authorAdam Langley <agl@golang.org>
Fri, 20 Dec 2013 16:37:05 +0000 (11:37 -0500)
committerAdam Langley <agl@golang.org>
Fri, 20 Dec 2013 16:37:05 +0000 (11:37 -0500)
commit6f149492bf939d30de3d02049939768041b73aba
tree1b7fd188da5fca207cd6b6e3a109f0b115ff5557
parent1cf3f501ad522a874cffefc9db234d57fbec4396
crypto/tls: rework reference tests.

The practice of storing reference connections for testing has worked
reasonably well, but the large blocks of literal data in the .go files
is ugly and updating the tests is a real problem because their number
has grown.

This CL changes the way that reference tests work. It's now possible to
automatically update the tests and the test data is now stored in
testdata/. This should make it easier to implement changes that affect
all connections, like implementing the renegotiation extension.

R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/42060044
42 files changed:
src/pkg/crypto/tls/handshake_client_test.go
src/pkg/crypto/tls/handshake_server_test.go
src/pkg/crypto/tls/handshake_test.go [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv10-ClientCert-ECDSA-ECDSA [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv10-ClientCert-ECDSA-RSA [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv10-ClientCert-RSA-ECDSA [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv10-ClientCert-RSA-RSA [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv10-ECDHE-ECDSA-AES [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv10-ECDHE-RSA-AES [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv10-RSA-RC4 [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv11-ECDHE-ECDSA-AES [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv11-ECDHE-RSA-AES [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv11-RSA-RC4 [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv12-ClientCert-ECDSA-ECDSA [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv12-ClientCert-ECDSA-RSA [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-ECDSA [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-RSA [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES-GCM [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv12-ECDHE-RSA-AES [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Client-TLSv12-RSA-RC4 [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-SSLv3-RSA-3DES [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-SSLv3-RSA-AES [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-SSLv3-RSA-RC4 [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv10-ECDHE-ECDSA-AES [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv10-RSA-3DES [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv10-RSA-AES [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv10-RSA-RC4 [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv11-RSA-RC4 [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv12-CipherSuiteCertPreferenceECDSA [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv12-CipherSuiteCertPreferenceRSA [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndECDSAGiven [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedAndGiven [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv12-ClientAuthRequestedNotGiven [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv12-ECDHE-ECDSA-AES [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv12-IssueTicket [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv12-RSA-3DES [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv12-RSA-AES [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv12-RSA-AES-GCM [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv12-RSA-RC4 [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv12-Resume [new file with mode: 0644]
src/pkg/crypto/tls/testdata/Server-TLSv12-SNI [new file with mode: 0644]