]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: rewrite some messages with golang.org/x/crypto/cryptobyte
authorFilippo Valsorda <filippo@golang.org>
Thu, 25 Oct 2018 01:22:00 +0000 (21:22 -0400)
committerFilippo Valsorda <filippo@golang.org>
Mon, 29 Oct 2018 17:05:55 +0000 (17:05 +0000)
commit4c8b09e9183390d6ab80d3f53a9fe5f6ace92f06
tree40df97a2d8244627f3ea5f1b849c8002ae9af235
parentcf6e4238b63a180abd5a390dc8f11d50f024ba35
crypto/tls: rewrite some messages with golang.org/x/crypto/cryptobyte

As a first round, rewrite those handshake message types which can be
reused in TLS 1.3 with golang.org/x/crypto/cryptobyte. All other types
changed significantly in TLS 1.3 and will require separate
implementations. They will be ported to cryptobyte in a later CL.

The only semantic changes should be enforcing the random length on the
marshaling side, enforcing a couple more "must not be empty" on the
unmarshaling side, and checking the rest of the SNI list even if we only
take the first.

Change-Id: Idd2ced60c558fafcf02ee489195b6f3b4735fe22
Reviewed-on: https://go-review.googlesource.com/c/144115
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
src/crypto/tls/conn.go
src/crypto/tls/handshake_client.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/go/build/deps_test.go