aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2014-01-29 12:19:16 +0100
committerIngela Anderton Andin <[email protected]>2014-01-29 12:19:16 +0100
commitaca06d62d1f82d8053136a0e9521669c05915514 (patch)
treeb30f2bffd1fc4ae7894311c955e31c0623890a90 /lib
parentaaedd450662a68e40b6c45e70024464e3f5dbcdf (diff)
downloadotp-aca06d62d1f82d8053136a0e9521669c05915514.tar.gz
otp-aca06d62d1f82d8053136a0e9521669c05915514.tar.bz2
otp-aca06d62d1f82d8053136a0e9521669c05915514.zip
ssl: Add workaround in test code for openssl s_client bug
Diffstat (limited to 'lib')
-rw-r--r--lib/ssl/test/ssl_to_openssl_SUITE.erl19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/ssl/test/ssl_to_openssl_SUITE.erl b/lib/ssl/test/ssl_to_openssl_SUITE.erl
index 68784a175e..a7361755e5 100644
--- a/lib/ssl/test/ssl_to_openssl_SUITE.erl
+++ b/lib/ssl/test/ssl_to_openssl_SUITE.erl
@@ -248,7 +248,7 @@ basic_erlang_server_openssl_client(Config) when is_list(Config) ->
Port = ssl_test_lib:inet_port(Server),
Cmd = "openssl s_client -port " ++ integer_to_list(Port) ++
- " -host localhost",
+ " -host localhost" ++ workaround_openssl_s_clinent(),
ct:log("openssl cmd: ~p~n", [Cmd]),
@@ -1383,3 +1383,20 @@ supports_sslv2(Port) ->
true
end.
+workaround_openssl_s_clinent() ->
+ %% http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683159
+ %% https://bugs.archlinux.org/task/33919
+ %% Bug seems to manifests it self if TLS version is not
+ %% explicitly specified
+ case os:cmd("openssl version") of
+ "OpenSSL 1.0.1c" ++ _ ->
+ " -no_tls1_2 ";
+ "OpenSSL 1.0.1d" ++ _ ->
+ " -no_tls1_2 ";
+ "OpenSSL 1.0.1e" ++ _ ->
+ " -no_tls1_2 ";
+ "OpenSSL 1.0.1f" ++ _ ->
+ " -no_tls1_2 ";
+ _ ->
+ ""
+ end.