Skip to content

Commit

Permalink
Add ALPN fields in fake test server and client
Browse files Browse the repository at this point in the history
  • Loading branch information
arjan-bal committed Aug 19, 2024
1 parent 99ea1d9 commit 5f71059
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion credentials/xds/xds_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ func testServerTLSHandshake(rawConn net.Conn) handshakeResult {
if err != nil {
return handshakeResult{err: err}
}
cfg := &tls.Config{Certificates: []tls.Certificate{cert}}
cfg := &tls.Config{
Certificates: []tls.Certificate{cert},
NextProtos: []string{"h2"},
}
conn := tls.Server(rawConn, cfg)
if err := conn.Handshake(); err != nil {
return handshakeResult{err: err}
Expand Down
1 change: 1 addition & 0 deletions credentials/xds/xds_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func makeClientTLSConfig(t *testing.T, mTLS bool) *tls.Config {
// verification function. So, the server credentials tests will rely
// solely on the success/failure of the server-side handshake.
InsecureSkipVerify: true,
NextProtos: []string{"h2"},
}
}

Expand Down

0 comments on commit 5f71059

Please sign in to comment.