diff options
author | Ingela Anderton Andin <[email protected]> | 2018-05-17 10:55:21 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2018-05-21 09:09:04 +0200 |
commit | 0d2e5491b4cf58ce68980c01fdfba50b7a4e95fc (patch) | |
tree | c8ebbaad4a4c6cb5118e16a3fc5d6f3161b64679 /lib | |
parent | f03603762806ac96cdca4a2c4f3b2b8b3190741a (diff) | |
download | otp-0d2e5491b4cf58ce68980c01fdfba50b7a4e95fc.tar.gz otp-0d2e5491b4cf58ce68980c01fdfba50b7a4e95fc.tar.bz2 otp-0d2e5491b4cf58ce68980c01fdfba50b7a4e95fc.zip |
ssl: Correct option handling to OpenSSL
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ssl/test/ssl_to_openssl_SUITE.erl | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/lib/ssl/test/ssl_to_openssl_SUITE.erl b/lib/ssl/test/ssl_to_openssl_SUITE.erl index a2e8ef8be0..671599223c 100644 --- a/lib/ssl/test/ssl_to_openssl_SUITE.erl +++ b/lib/ssl/test/ssl_to_openssl_SUITE.erl @@ -412,8 +412,16 @@ basic_erlang_server_openssl_client(Config) when is_list(Config) -> Port = ssl_test_lib:inet_port(Server), Exe = "openssl", - Args = ["s_client", "-connect", hostname_format(Hostname) ++ - ":" ++ integer_to_list(Port) ++ no_low_flag() | workaround_openssl_s_clinent()], + Args = case no_low_flag("-no_ssl2") of + [] -> + ["s_client", "-connect", hostname_format(Hostname) ++ + ":" ++ integer_to_list(Port), no_low_flag("-no_ssl3") + | workaround_openssl_s_clinent()]; + Flag -> + ["s_client", "-connect", hostname_format(Hostname) ++ + ":" ++ integer_to_list(Port), no_low_flag("-no_ssl3"), Flag + | workaround_openssl_s_clinent()] + end, OpenSslPort = ssl_test_lib:portable_open_port(Exe, Args), true = port_command(OpenSslPort, Data), @@ -1995,10 +2003,12 @@ hostname_format(Hostname) -> "localhost" end. -no_low_flag() -> +no_low_flag("-no_ssl2" = Flag) -> case ssl_test_lib:supports_ssl_tls_version(sslv2) of true -> - " -no_ssl2 -no_ssl3"; + Flag; false -> - " -no_ssl3" - end. + "" + end; +no_low_flag(Flag) -> + Flag. |