aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-05-31 09:30:10 +0200
committerIngela Anderton Andin <[email protected]>2016-05-31 09:30:10 +0200
commit98f13e3c4cf6282e2114deb71805c54596ffdc8a (patch)
tree7cc6264b5e0eb0c8b0f17046949f8927e392ece3
parentffd39bdee7d0cbac044ca6c72afb65689c33b168 (diff)
parentc0ab8932e60cb594c17a2f912f8421d28bcb52a5 (diff)
downloadotp-98f13e3c4cf6282e2114deb71805c54596ffdc8a.tar.gz
otp-98f13e3c4cf6282e2114deb71805c54596ffdc8a.tar.bz2
otp-98f13e3c4cf6282e2114deb71805c54596ffdc8a.zip
Merge remote-tracking branch 'origin/ingela/ssl/dtls-test-cuddle'
* origin/ingela/ssl/dtls-test-cuddle: ssl: Fix TLS version handling in dtls adepted tests
-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) ->