aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/ssl_test_lib.erl
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/ssl_test_lib.erl
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/ssl_test_lib.erl')
-rw-r--r--lib/ssl/test/ssl_test_lib.erl13
1 files changed, 12 insertions, 1 deletions
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) ->