diff options
-rw-r--r-- | lib/ssl/test/ssl_api_SUITE.erl | 153 |
1 files changed, 78 insertions, 75 deletions
diff --git a/lib/ssl/test/ssl_api_SUITE.erl b/lib/ssl/test/ssl_api_SUITE.erl index 989f36164f..4394d0cd2f 100644 --- a/lib/ssl/test/ssl_api_SUITE.erl +++ b/lib/ssl/test/ssl_api_SUITE.erl @@ -44,7 +44,6 @@ all() -> groups() -> [ - %%{'tlsv1.3', [], gen_api_tests() ++ handshake_paus_tests()}, {'tlsv1.3', [], ((gen_api_tests() ++ tls13_group() ++ handshake_paus_tests()) -- [dh_params, honor_server_cipher_order, honor_client_cipher_order, new_options_in_handshake]) ++ (since_1_2() -- [conf_signature_algs])}, @@ -427,32 +426,6 @@ 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) -> @@ -1204,30 +1177,7 @@ honor_server_cipher_order(Config) when is_list(Config) -> cipher => aes_256_cbc, mac => sha, prf => default_prf}). -%%-------------------------------------------------------------------- -honor_server_cipher_order_tls13() -> - [{doc,"Test API honor server cipher order in TLS 1.3."}]. -honor_server_cipher_order_tls13(Config) when is_list(Config) -> - ClientCiphers = [#{key_exchange => any, - cipher => aes_256_gcm, - mac => aead, - prf => sha384}, - #{key_exchange => any, - cipher => aes_128_gcm, - mac => aead, - prf => sha256}], - ServerCiphers = [#{key_exchange => any, - cipher => aes_128_gcm, - mac => aead, - prf => sha256}, - #{key_exchange => any, - cipher => aes_256_gcm, - mac => aead, - prf => sha384}], - honor_cipher_order(Config, true, ServerCiphers, ClientCiphers, #{key_exchange => any, - cipher => aes_128_gcm, - mac => aead, - prf => sha256}). + %%-------------------------------------------------------------------- honor_client_cipher_order() -> [{doc,"Test API honor server cipher order."}]. @@ -1252,30 +1202,7 @@ honor_client_cipher_order(Config) when is_list(Config) -> cipher => aes_128_cbc, mac => sha, prf => default_prf}). -%%-------------------------------------------------------------------- -honor_client_cipher_order_tls13() -> - [{doc,"Test API honor server cipher order in TLS 1.3."}]. -honor_client_cipher_order_tls13(Config) when is_list(Config) -> - ClientCiphers = [#{key_exchange => any, - cipher => aes_256_gcm, - mac => aead, - prf => sha384}, - #{key_exchange => any, - cipher => aes_128_gcm, - mac => aead, - prf => sha256}], - ServerCiphers = [#{key_exchange => any, - cipher => aes_128_gcm, - mac => aead, - prf => sha256}, - #{key_exchange => any, - cipher => aes_256_gcm, - mac => aead, - prf => sha384}], - honor_cipher_order(Config, false, ServerCiphers, ClientCiphers, #{key_exchange => any, - cipher => aes_256_gcm, - mac => aead, - prf => sha384}). + %%-------------------------------------------------------------------- ipv6() -> [{require, ipv6_hosts}, @@ -1681,6 +1608,82 @@ rizzo_one_n_minus_one (Config) -> ssl_test_lib:basic_test(ClientOpts, ServerOpts, Config). +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). + +%%-------------------------------------------------------------------- +honor_client_cipher_order_tls13() -> + [{doc,"Test API honor server cipher order in TLS 1.3."}]. +honor_client_cipher_order_tls13(Config) when is_list(Config) -> + ClientCiphers = [#{key_exchange => any, + cipher => aes_256_gcm, + mac => aead, + prf => sha384}, + #{key_exchange => any, + cipher => aes_128_gcm, + mac => aead, + prf => sha256}], + ServerCiphers = [#{key_exchange => any, + cipher => aes_128_gcm, + mac => aead, + prf => sha256}, + #{key_exchange => any, + cipher => aes_256_gcm, + mac => aead, + prf => sha384}], + honor_cipher_order(Config, false, ServerCiphers, ClientCiphers, #{key_exchange => any, + cipher => aes_256_gcm, + mac => aead, + prf => sha384}). + +%%-------------------------------------------------------------------- +honor_server_cipher_order_tls13() -> + [{doc,"Test API honor server cipher order in TLS 1.3."}]. +honor_server_cipher_order_tls13(Config) when is_list(Config) -> + ClientCiphers = [#{key_exchange => any, + cipher => aes_256_gcm, + mac => aead, + prf => sha384}, + #{key_exchange => any, + cipher => aes_128_gcm, + mac => aead, + prf => sha256}], + ServerCiphers = [#{key_exchange => any, + cipher => aes_128_gcm, + mac => aead, + prf => sha256}, + #{key_exchange => any, + cipher => aes_256_gcm, + mac => aead, + prf => sha384}], + honor_cipher_order(Config, true, ServerCiphers, ClientCiphers, #{key_exchange => any, + cipher => aes_128_gcm, + mac => aead, + prf => sha256}). + + %%-------------------------------------------------------------------- %% Internal functions ------------------------------------------------ %%-------------------------------------------------------------------- |