aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/ssl_to_openssl_SUITE.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-01-19 16:36:08 +0100
committerIngela Anderton Andin <[email protected]>2016-01-21 09:23:50 +0100
commit3fab95dc101e5765db66ae8b8479c181a934912d (patch)
treee2c4bc95631255e9a359478f748d12e280106c70 /lib/ssl/test/ssl_to_openssl_SUITE.erl
parentfcfa908ab59a21101ced5f362f8129519f576910 (diff)
downloadotp-3fab95dc101e5765db66ae8b8479c181a934912d.tar.gz
otp-3fab95dc101e5765db66ae8b8479c181a934912d.tar.bz2
otp-3fab95dc101e5765db66ae8b8479c181a934912d.zip
ssl: In interop tests always check if SSL/TLS version is supported by OpenSSL
As sslv3 is being faced out we need to test for old version support as well as newer versions.
Diffstat (limited to 'lib/ssl/test/ssl_to_openssl_SUITE.erl')
-rw-r--r--lib/ssl/test/ssl_to_openssl_SUITE.erl33
1 files changed, 6 insertions, 27 deletions
diff --git a/lib/ssl/test/ssl_to_openssl_SUITE.erl b/lib/ssl/test/ssl_to_openssl_SUITE.erl
index 13523730b0..bcdefb5fca 100644
--- a/lib/ssl/test/ssl_to_openssl_SUITE.erl
+++ b/lib/ssl/test/ssl_to_openssl_SUITE.erl
@@ -175,7 +175,12 @@ special_init(TestCase, Config)
check_sane_openssl_renegotaite(Config, Version);
special_init(ssl2_erlang_server_openssl_client, Config) ->
- check_sane_openssl_sslv2(Config);
+ case ssl_test_lib:supports_ssl_tls_version(sslv2) of
+ true ->
+ Config;
+ false ->
+ {skip, "sslv2 not supported by openssl"}
+ end;
special_init(TestCase, Config)
when TestCase == erlang_client_alpn_openssl_server_alpn;
@@ -1756,32 +1761,6 @@ check_sane_openssl_renegotaite(Config) ->
Config
end.
-check_sane_openssl_sslv2(Config) ->
- Exe = "openssl",
- Args = ["s_client", "-ssl2"],
- Port = ssl_test_lib:portable_open_port(Exe, Args),
- case supports_sslv2(Port) of
- true ->
- Config;
- false ->
- {skip, "sslv2 not supported by openssl"}
- end.
-
-supports_sslv2(Port) ->
- receive
- {Port, {data, "unknown option -ssl2" ++ _}} ->
- false;
- {Port, {data, Data}} ->
- case lists:member("error", string:tokens(Data, ":")) of
- true ->
- false;
- false ->
- supports_sslv2(Port)
- end
- after 500 ->
- true
- end.
-
workaround_openssl_s_clinent() ->
%% http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683159
%% https://bugs.archlinux.org/task/33919