aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2017-08-10 10:00:53 +0200
committerIngela Anderton Andin <[email protected]>2017-08-10 10:00:53 +0200
commite56a676958b86d9190747301e032481811d61a36 (patch)
tree399a4bb6b8ad980dfac75c551676523f0e1c8260
parent48e35d38d7625a10395b03edb4337668abaa4905 (diff)
parent2432649120fd413894b5bb60d8ac864f6632e868 (diff)
downloadotp-e56a676958b86d9190747301e032481811d61a36.tar.gz
otp-e56a676958b86d9190747301e032481811d61a36.tar.bz2
otp-e56a676958b86d9190747301e032481811d61a36.zip
Merge branch 'maint'
-rw-r--r--lib/ssl/test/ssl_test_lib.erl33
1 files changed, 18 insertions, 15 deletions
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl
index 3b9073ac0b..e61993598e 100644
--- a/lib/ssl/test/ssl_test_lib.erl
+++ b/lib/ssl/test/ssl_test_lib.erl
@@ -1429,7 +1429,7 @@ supports_ssl_tls_version(sslv2 = Version) ->
Exe = "openssl",
Args = ["s_client", VersionFlag],
Port = ssl_test_lib:portable_open_port(Exe, Args),
- do_supports_ssl_tls_version(Port)
+ do_supports_ssl_tls_version(Port, "")
end;
supports_ssl_tls_version(Version) ->
@@ -1437,23 +1437,26 @@ supports_ssl_tls_version(Version) ->
Exe = "openssl",
Args = ["s_client", VersionFlag],
Port = ssl_test_lib:portable_open_port(Exe, Args),
- do_supports_ssl_tls_version(Port).
+ do_supports_ssl_tls_version(Port, "").
-do_supports_ssl_tls_version(Port) ->
+do_supports_ssl_tls_version(Port, Acc) ->
receive
- {Port, {data, "u"}} ->
- false;
- {Port, {data, "unknown option" ++ _}} ->
- false;
- {Port, {data, Data}} ->
- case lists:member("error", string:tokens(Data, ":")) of
- true ->
- false;
- false ->
- do_supports_ssl_tls_version(Port)
- end
+ {Port, {data, Data}} ->
+ case Acc ++ Data of
+ "unknown option" ++ _ ->
+ false;
+ Error when length(Error) >= 11 ->
+ case lists:member("error", string:tokens(Data, ":")) of
+ true ->
+ false;
+ false ->
+ do_supports_ssl_tls_version(Port, Error)
+ end;
+ _ ->
+ do_supports_ssl_tls_version(Port, Acc ++ Data)
+ end
after 1000 ->
- true
+ true
end.
ssl_options(Option, Config) when is_atom(Option) ->