aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/ssl_alpn_handshake_SUITE.erl
diff options
context:
space:
mode:
authorIngela Andin <[email protected]>2019-01-15 15:28:44 +0100
committerGitHub <[email protected]>2019-01-15 15:28:44 +0100
commitacc4f00fe4b3c66738aaf3f58951dbf0a96b174c (patch)
tree80e321fdadc3aed91ec89fc52b1220f8fb814ad0 /lib/ssl/test/ssl_alpn_handshake_SUITE.erl
parente3a20d907323f5b29a02dad453df0583582ee94e (diff)
parentba4fb703a5c20ed26186d5ae968020819c1d8780 (diff)
downloadotp-acc4f00fe4b3c66738aaf3f58951dbf0a96b174c.tar.gz
otp-acc4f00fe4b3c66738aaf3f58951dbf0a96b174c.tar.bz2
otp-acc4f00fe4b3c66738aaf3f58951dbf0a96b174c.zip
Merge pull request #2082 from IngelaAndin/ingela/ssl/save-specific-session/OTP-15369
Ingela/ssl/save specific session/otp 15369
Diffstat (limited to 'lib/ssl/test/ssl_alpn_handshake_SUITE.erl')
-rw-r--r--lib/ssl/test/ssl_alpn_handshake_SUITE.erl44
1 files changed, 2 insertions, 42 deletions
diff --git a/lib/ssl/test/ssl_alpn_handshake_SUITE.erl b/lib/ssl/test/ssl_alpn_handshake_SUITE.erl
index 04c4b257d9..7f7c3da5ab 100644
--- a/lib/ssl/test/ssl_alpn_handshake_SUITE.erl
+++ b/lib/ssl/test/ssl_alpn_handshake_SUITE.erl
@@ -262,52 +262,12 @@ client_renegotiate(Config) when is_list(Config) ->
%--------------------------------------------------------------------------------
session_reused(Config) when is_list(Config)->
- ClientOpts0 = ssl_test_lib:ssl_options(client_rsa_opts, Config),
+ ClientOpts0 = ssl_test_lib:ssl_options(client_rsa_verify_opts, Config),
ClientOpts = [{alpn_advertised_protocols, [<<"http/1.0">>]}] ++ ClientOpts0,
ServerOpts0 = ssl_test_lib:ssl_options(server_rsa_opts, Config),
ServerOpts = [{alpn_preferred_protocols, [<<"spdy/2">>, <<"http/1.1">>, <<"http/1.0">>]}] ++ ServerOpts0,
- {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
- Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
- {from, self()},
- {mfa, {ssl_test_lib, session_info_result, []}},
- {options, ServerOpts}]),
-
- Port = ssl_test_lib:inet_port(Server),
- Client = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
- {host, Hostname},
- {from, self()},
- {mfa, {ssl_test_lib, no_result_msg, []}},
- {options, ClientOpts}]),
-
- SessionInfo =
- receive
- {Server, Info} ->
- Info
- end,
-
- Server ! {listen, {mfa, {ssl_test_lib, no_result, []}}},
-
- %% Make sure session is registered
- ct:sleep(?SLEEP),
-
- Client1 =
- ssl_test_lib:start_client([{node, ClientNode},
- {port, Port}, {host, Hostname},
- {mfa, {ssl_test_lib, session_info_result, []}},
- {from, self()}, {options, ClientOpts}]),
-
- receive
- {Client1, SessionInfo} ->
- ok;
- {Client1, Other} ->
- ct:fail(Other)
- end,
-
- ssl_test_lib:close(Server),
- ssl_test_lib:close(Client),
- ssl_test_lib:close(Client1).
-
+ ssl_test_lib:reuse_session(ClientOpts, ServerOpts, Config).
%--------------------------------------------------------------------------------
alpn_not_supported_client(Config) when is_list(Config) ->