Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
0759-ssl-Correct-openssl_reject_SUITE.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0759-ssl-Correct-openssl_reject_SUITE.patch of Package erlang
From 9b3813bf2fed3564e07f872919f90c7fb14ab97d Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin <ingela@erlang.org> Date: Tue, 30 Nov 2021 11:31:09 +0100 Subject: [PATCH 2/2] ssl: Correct openssl_reject_SUITE --- lib/ssl/test/openssl_reject_SUITE.erl | 39 ++++++++++++++------------- lib/ssl/test/ssl_test_lib.erl | 3 ++- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/lib/ssl/test/openssl_reject_SUITE.erl b/lib/ssl/test/openssl_reject_SUITE.erl index e231a5ab99..bc7412af25 100644 --- a/lib/ssl/test/openssl_reject_SUITE.erl +++ b/lib/ssl/test/openssl_reject_SUITE.erl @@ -36,10 +36,10 @@ %% Test cases -export([erlang_client_bad_openssl_server/0, erlang_client_bad_openssl_server/1, - ssl2_erlang_server_openssl_client/0, - ssl2_erlang_server_openssl_client/1, - ssl3_erlang_server_openssl_client/0, - ssl3_erlang_server_openssl_client/1 + erlang_server_reject_sslv2/0, + erlang_server_reject_sslv2/1, + erlang_server_reject_sslv3/0, + erlang_server_reject_sslv3/1 ]). %% Apply export @@ -55,13 +55,16 @@ %%-------------------------------------------------------------------- all() -> - [{group, 'tlsv1.2'}, + [{group, 'tlsv1.3'}, + {group, 'tlsv1.2'}, {group, 'tlsv1.1'}, {group, 'tlsv1'} ]. groups() -> - [{'tlsv1.2', [], all_versions_tests()}, + [ + {'tlsv1.3', [], all_versions_tests()}, + {'tlsv1.2', [], all_versions_tests()}, {'tlsv1.1', [], all_versions_tests()}, {'tlsv1', [], all_versions_tests()} ]. @@ -69,8 +72,8 @@ groups() -> all_versions_tests() -> [ erlang_client_bad_openssl_server, - ssl2_erlang_server_openssl_client, - ssl3_erlang_server_openssl_client + erlang_server_reject_sslv2, + erlang_server_reject_sslv3 ]. init_per_suite(Config0) -> @@ -104,15 +107,15 @@ init_per_testcase(TestCase, Config) -> ct:timetrap({seconds, 10}), special_init(TestCase, Config). -special_init(ssl2_erlang_server_openssl_client, Config) -> - case ssl_test_lib:supports_ssl_tls_version(sslv2) of +special_init(erlang_server_reject_sslv2, Config) -> + case ssl_test_lib:check_sane_openssl_version(sslv2) of true -> Config; false -> {skip, "sslv2 not supported by openssl"} end; -special_init(ssl3_erlang_server_openssl_client, Config) -> - case ssl_test_lib:supports_ssl_tls_version(sslv3) of +special_init(erlang_server_reject_sslv3, Config) -> + case ssl_test_lib:check_sane_openssl_version(sslv3) of true -> Config; false -> @@ -180,10 +183,10 @@ erlang_client_bad_openssl_server(Config) when is_list(Config) -> process_flag(trap_exit, false). %%-------------------------------------------------------------------- -ssl2_erlang_server_openssl_client() -> +erlang_server_reject_sslv2() -> [{doc,"Test that ssl v2 clients are rejected"}]. -ssl2_erlang_server_openssl_client(Config) when is_list(Config) -> +erlang_server_reject_sslv2(Config) when is_list(Config) -> process_flag(trap_exit, true), ServerOpts = ssl_test_lib:ssl_options(server_rsa_opts, Config), @@ -202,14 +205,14 @@ ssl2_erlang_server_openssl_client(Config) when is_list(Config) -> ct:log("Ports ~p~n", [[erlang:port_info(P) || P <- erlang:ports()]]), ssl_test_lib:consume_port_exit(OpenSslPort), - ssl_test_lib:check_server_alert(Server, bad_record_mac), + ssl_test_lib:check_server_alert(Server, unexpected_message), process_flag(trap_exit, false). %%-------------------------------------------------------------------- -ssl3_erlang_server_openssl_client() -> +erlang_server_reject_sslv3() -> [{doc,"Test that ssl v3 clients are rejected"}]. -ssl3_erlang_server_openssl_client(Config) when is_list(Config) -> +erlang_server_reject_sslv3(Config) when is_list(Config) -> process_flag(trap_exit, true), ServerOpts = ssl_test_lib:ssl_options(server_rsa_opts, Config), @@ -228,7 +231,7 @@ ssl3_erlang_server_openssl_client(Config) when is_list(Config) -> ct:log("Ports ~p~n", [[erlang:port_info(P) || P <- erlang:ports()]]), ssl_test_lib:consume_port_exit(OpenSslPort), - ssl_test_lib:check_server_alert(Server, bad_record_mac), + ssl_test_lib:check_server_alert(Server, protocol_version), process_flag(trap_exit, false). %%-------------------------------------------------------------------- diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl index 8b30819816..bd62b09655 100644 --- a/lib/ssl/test/ssl_test_lib.erl +++ b/lib/ssl/test/ssl_test_lib.erl @@ -127,7 +127,8 @@ hardcode_rsa_key/1, bigger_buffers/0, stop/2, - working_openssl_client/0 + working_openssl_client/0, + hostname_format/1 ]). -export([basic_test/3, -- 2.31.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor