aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/ssl_test_lib.erl
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 /lib/ssl/test/ssl_test_lib.erl
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
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) ->