aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-05-27 23:01:45 +0200
committerIngela Anderton Andin <[email protected]>2016-05-27 23:01:45 +0200
commitc0ab8932e60cb594c17a2f912f8421d28bcb52a5 (patch)
treeca7c45bfc4edf8e48f4dbfb6698aa5f9242bb0b8 /lib/ssl/test
parent49ed8a5a1cddc806dd520aaa79e1a089194566c1 (diff)
downloadotp-c0ab8932e60cb594c17a2f912f8421d28bcb52a5.tar.gz
otp-c0ab8932e60cb594c17a2f912f8421d28bcb52a5.tar.bz2
otp-c0ab8932e60cb594c17a2f912f8421d28bcb52a5.zip
ssl: Fix TLS version handling in dtls adepted tests
Diffstat (limited to 'lib/ssl/test')
-rw-r--r--lib/ssl/test/ssl_basic_SUITE.erl2
-rw-r--r--lib/ssl/test/ssl_test_lib.erl13
2 files changed, 13 insertions, 2 deletions
diff --git a/lib/ssl/test/ssl_basic_SUITE.erl b/lib/ssl/test/ssl_basic_SUITE.erl
index cd06b97ab2..aa45d55406 100644
--- a/lib/ssl/test/ssl_basic_SUITE.erl
+++ b/lib/ssl/test/ssl_basic_SUITE.erl
@@ -2611,7 +2611,7 @@ client_no_wrap_sequence_number(Config) when is_list(Config) ->
{options, ServerOpts}]),
Port = ssl_test_lib:inet_port(Server),
- Version = ssl_test_lib:protocol_version(Config),
+ Version = ssl_test_lib:protocol_version(Config, tuple),
Client = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
{host, Hostname},
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl
index 543728627e..27c670cdc2 100644
--- a/lib/ssl/test/ssl_test_lib.erl
+++ b/lib/ssl/test/ssl_test_lib.erl
@@ -1315,11 +1315,22 @@ ssl_options(Option, Config) ->
Opts ++ ProtocolOpts.
protocol_version(Config) ->
+ protocol_version(Config, atom).
+
+protocol_version(Config, tuple) ->
case proplists:get_value(protocol, Config) of
dtls ->
dtls_record:protocol_version(dtls_record:highest_protocol_version([]));
_ ->
- tls_record:protocol_version(tls_record:highest_protocol_version([]))
+ tls_record:highest_protocol_version(tls_record:supported_protocol_versions())
+ end;
+
+protocol_version(Config, atom) ->
+ case proplists:get_value(protocol, Config) of
+ dtls ->
+ dtls_record:protocol_version(protocol_version(Config, tuple));
+ _ ->
+ tls_record:protocol_version(protocol_version(Config, tuple))
end.
protocol_options(Config, Options) ->