aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2019-07-23 16:44:05 +0200
committerPéter Dimitrov <[email protected]>2019-07-25 14:55:37 +0200
commitb4fddea062fc13b0562bf8bf2f4cc3dc02cd193c (patch)
tree3ae2e9ba671d546c8882c7b2449ce787567b41df /lib
parentcbc8e9ce89ce30e3be90d9ad500becd3c26370e1 (diff)
downloadotp-b4fddea062fc13b0562bf8bf2f4cc3dc02cd193c.tar.gz
otp-b4fddea062fc13b0562bf8bf2f4cc3dc02cd193c.tar.bz2
otp-b4fddea062fc13b0562bf8bf2f4cc3dc02cd193c.zip
ssl: Add test for option supported_groups
Diffstat (limited to 'lib')
-rw-r--r--lib/ssl/test/ssl_api_SUITE.erl33
1 files changed, 32 insertions, 1 deletions
diff --git a/lib/ssl/test/ssl_api_SUITE.erl b/lib/ssl/test/ssl_api_SUITE.erl
index 72a49bf4a9..a7b2a71690 100644
--- a/lib/ssl/test/ssl_api_SUITE.erl
+++ b/lib/ssl/test/ssl_api_SUITE.erl
@@ -45,7 +45,7 @@ all() ->
groups() ->
[
%%{'tlsv1.3', [], gen_api_tests() ++ handshake_paus_tests()},
- {'tlsv1.3', [], (gen_api_tests() -- [dh_params, honor_server_cipher_order, honor_client_cipher_order,
+ {'tlsv1.3', [], ((gen_api_tests() ++ tls13_group()) -- [dh_params, honor_server_cipher_order, honor_client_cipher_order,
new_options_in_handshake])
++ (since_1_2() -- [conf_signature_algs])},
{'tlsv1.2', [], gen_api_tests() ++ since_1_2() ++ handshake_paus_tests() ++ pre_1_3()},
@@ -125,6 +125,12 @@ beast_mitigation_test() ->
rizzo_one_n_minus_one
].
+tls13_group() ->
+ [
+ supported_groups
+ ].
+
+
init_per_suite(Config0) ->
catch crypto:stop(),
try crypto:start() of
@@ -419,7 +425,32 @@ no_common_signature_algs(Config) when is_list(Config) ->
ssl_test_lib:check_server_alert(Server, Client, insufficient_security).
%%--------------------------------------------------------------------
+supported_groups() ->
+ [{doc,"Test the supported_groups option in TLS 1.3."}].
+
+supported_groups(Config) when is_list(Config) ->
+ ClientOpts = ssl_test_lib:ssl_options(client_rsa_opts, Config),
+ ServerOpts = ssl_test_lib:ssl_options(server_rsa_opts, Config),
+
+ {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, send_recv_result_active, []}},
+ {options, [{supported_groups, [x448, x25519]} | 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, send_recv_result_active, []}},
+ {options, [{supported_groups,[x448]} | ClientOpts]}]),
+ ssl_test_lib:check_result(Server, ok, Client, ok),
+
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client).
+
+%%--------------------------------------------------------------------
handshake_continue() ->
[{doc, "Test API function ssl:handshake_continue/3"}].
handshake_continue(Config) when is_list(Config) ->