summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2010-09-07 15:04:20 +0100
committerAlexandru Scvortov <alexandru@rabbitmq.com>2010-09-07 15:04:20 +0100
commit0e1b68e119297053c48c8e0f542727b9d86093f9 (patch)
treef455e9b480fe2d6510a7907eec855fa2e158f199 /src
parent50ac875057e3e1cb0b5e39f587f9aa0afc105fe1 (diff)
downloadrabbitmq-server-git-0e1b68e119297053c48c8e0f542727b9d86093f9.tar.gz
accept string names for ciphers; don't clobber user-defined cipher option
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_networking.erl14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/rabbit_networking.erl b/src/rabbit_networking.erl
index 8151fd980e..81a0d50af5 100644
--- a/src/rabbit_networking.erl
+++ b/src/rabbit_networking.erl
@@ -117,10 +117,16 @@ boot_ssl() ->
| SslOptsConfig]
end,
% In R13B04 and R14A (at least), rc4 is incorrectly implemented.
- CSs = lists:filter(fun ({_, rc4_128, _}) -> false;
- (_) -> true
- end, ssl:cipher_suites()),
- SslOpts1 = [{ciphers, CSs} | SslOpts],
+ CSs = lists:filter(
+ fun ({_, rc4_128, _}) ->
+ false;
+ (S) when is_list(S) ->
+ match =/= re:run(S, "RC4", [{capture, none}]);
+ (_) ->
+ true
+ end,
+ proplists:get_value(ciphers, SslOpts, ssl:cipher_suites())),
+ SslOpts1 = [{ciphers, CSs} | [{K, V} || {K, V} <- SslOpts, K =/= ciphers]],
[start_ssl_listener(Host, Port, SslOpts1) || {Host, Port} <- SslListeners],
ok
end.