]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: enforce ALPN overlap when negotiated on both sides
authorRoland Shoemaker <roland@golang.org>
Tue, 2 Feb 2021 20:58:30 +0000 (12:58 -0800)
committerRoland Shoemaker <roland@golang.org>
Thu, 6 May 2021 18:57:43 +0000 (18:57 +0000)
commit90d6bbbe42c15d444c1da0a1c293192d6f735a8e
treeed1ccd1bafdb9f69cd48af825d2e5034742fcf7e
parent402f177efc5d03c11ac6fd25ebd1f42b0b7ec30c
crypto/tls: enforce ALPN overlap when negotiated on both sides

During the TLS handshake if the server doesn't support any of the
application protocols requested by the client, send the
no_application_protocol alert and abort the handshake on the server
side. This enforces the requirements of RFC 7301.

Change-Id: Iced2bb5c6efc607497de1c40ee3de9c2b393fa5d
Reviewed-on: https://go-review.googlesource.com/c/go/+/289209
Trust: Roland Shoemaker <roland@golang.org>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
doc/go1.17.html
src/crypto/tls/common.go
src/crypto/tls/handshake_client_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-TLSv12-ALPN-NoMatch
src/crypto/tls/testdata/Server-TLSv12-ALPN-NotConfigured [new file with mode: 0644]
src/crypto/tls/testdata/Server-TLSv13-ALPN-NoMatch
src/crypto/tls/testdata/Server-TLSv13-ALPN-NotConfigured [new file with mode: 0644]