Skip to content

Commit

Permalink
test: fix alpn tests for openssl1.0.2h
Browse files Browse the repository at this point in the history
cherry-pick 65030c7 from v6-staging.

openssl/openssl@af2db04
changed some ALPN behaviors. The tests when ALPN has no selection
should be fixed because openssl was changed NPN callback to be invoked
in this case.

Fixes: #6458
PR-URL: #6550
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Fedor Indutny <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
  • Loading branch information
Shigeki Ohtsu authored and MylesBorins committed Jan 19, 2017
1 parent d706c0d commit 43ee08f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions test/parallel/test-tls-alpn-server-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ function Test1() {
client: {ALPN: 'b', NPN: undefined}});
// nothing is selected by ALPN
checkResults(results[2],
{server: {ALPN: false, NPN: false},
client: {ALPN: false, NPN: undefined}});
{server: {ALPN: false, NPN: 'first-priority-unsupported'},
client: {ALPN: false, NPN: false}});
// execute next test
Test2();
});
Expand Down Expand Up @@ -132,8 +132,8 @@ function Test2() {
client: {ALPN: 'b', NPN: undefined}});
// nothing is selected by ALPN
checkResults(results[2],
{server: {ALPN: false, NPN: false},
client: {ALPN: false, NPN: undefined}});
{server: {ALPN: false, NPN: 'http/1.1'},
client: {ALPN: false, NPN: false}});
// execute next test
Test3();
});
Expand Down Expand Up @@ -224,8 +224,9 @@ function Test5() {
checkResults(results[1], {server: {ALPN: 'b', NPN: false},
client: {ALPN: 'b', NPN: undefined}});
// nothing is selected by ALPN
checkResults(results[2], {server: {ALPN: false, NPN: false},
client: {ALPN: false, NPN: undefined}});
checkResults(results[2], {server: {ALPN: false,
NPN: 'first-priority-unsupported'},
client: {ALPN: false, NPN: false}});
// execute next test
Test6();
});
Expand Down Expand Up @@ -253,8 +254,8 @@ function Test6() {
checkResults(results[1], {server: {ALPN: 'b', NPN: false},
client: {ALPN: 'b', NPN: undefined}});
// nothing is selected by ALPN
checkResults(results[2], {server: {ALPN: false, NPN: false},
client: {ALPN: false, NPN: undefined}});
checkResults(results[2], {server: {ALPN: false, NPN: 'http/1.1'},
client: {ALPN: false, NPN: false}});
// execute next test
Test7();
});
Expand Down

0 comments on commit 43ee08f

Please sign in to comment.