]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: implement TLS 1.3 PSK authentication (server side)
authorFilippo Valsorda <filippo@golang.org>
Mon, 5 Nov 2018 20:59:08 +0000 (15:59 -0500)
committerFilippo Valsorda <filippo@golang.org>
Mon, 12 Nov 2018 20:43:35 +0000 (20:43 +0000)
commit6435d0cfbf72f405f31430e60766add6d6762fe1
tree2dbaba2dd1d2649131d484002defd80f7c82d3e2
parentd669cc47ad8bfde5c0a525563803b3cc444fe897
crypto/tls: implement TLS 1.3 PSK authentication (server side)

Added some assertions to testHandshake, but avoided checking the error
of one of the Close() because the one that would lose the race would
write the closeNotify to a connection closed on the other side which is
broken on js/wasm (#28650). Moved that Close() after the chan sync to
ensure it happens second.

Accepting a ticket with client certificates when NoClientCert is
configured is probably not a problem, and we could hide them to avoid
confusing the application, but the current behavior is to skip the
ticket, and I'd rather keep behavior changes to a minimum.

Updates #9671

Change-Id: I93b56e44ddfe3d48c2bef52c83285ba2f46f297a
Reviewed-on: https://go-review.googlesource.com/c/147445
Reviewed-by: Adam Langley <agl@golang.org>
25 files changed:
src/crypto/tls/common.go
src/crypto/tls/handshake_client_test.go
src/crypto/tls/handshake_client_tls13.go
src/crypto/tls/handshake_messages.go
src/crypto/tls/handshake_messages_test.go
src/crypto/tls/handshake_server.go
src/crypto/tls/handshake_server_test.go
src/crypto/tls/handshake_server_tls13.go
src/crypto/tls/testdata/Server-TLSv13-AES128-SHA256
src/crypto/tls/testdata/Server-TLSv13-AES256-SHA384
src/crypto/tls/testdata/Server-TLSv13-ALPN
src/crypto/tls/testdata/Server-TLSv13-ALPN-NoMatch
src/crypto/tls/testdata/Server-TLSv13-CHACHA20-SHA256
src/crypto/tls/testdata/Server-TLSv13-ECDHE-ECDSA-AES
src/crypto/tls/testdata/Server-TLSv13-ExportKeyingMaterial
src/crypto/tls/testdata/Server-TLSv13-HelloRetryRequest
src/crypto/tls/testdata/Server-TLSv13-IssueTicket [new file with mode: 0644]
src/crypto/tls/testdata/Server-TLSv13-IssueTicketPreDisable [new file with mode: 0644]
src/crypto/tls/testdata/Server-TLSv13-P256
src/crypto/tls/testdata/Server-TLSv13-RSA-RSAPSS
src/crypto/tls/testdata/Server-TLSv13-Resume [new file with mode: 0644]
src/crypto/tls/testdata/Server-TLSv13-Resume-HelloRetryRequest [new file with mode: 0644]
src/crypto/tls/testdata/Server-TLSv13-ResumeDisabled [new file with mode: 0644]
src/crypto/tls/testdata/Server-TLSv13-X25519
src/crypto/tls/ticket.go