diff options
Diffstat (limited to 'lib/ssl/test/ssl_test_lib.erl')
-rw-r--r-- | lib/ssl/test/ssl_test_lib.erl | 13 |
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) -> |