Skip to content

Commit 3f5932f

Browse files
author
Marek Majkowski
committed
merged heads
2 parents 1097814 + 4e517ea commit 3f5932f

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

src/rabbit_amqqueue_process.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ next_state(State) ->
201201
State1 = #q{backing_queue = BQ, backing_queue_state = BQS} =
202202
ensure_rate_timer(State),
203203
State2 = ensure_stats_timer(State1),
204-
case BQ:needs_idle_timeout(BQS)of
204+
case BQ:needs_idle_timeout(BQS) of
205205
true -> {ensure_sync_timer(State2), 0};
206206
false -> {stop_sync_timer(State2), hibernate}
207207
end.

src/rabbit_networking.erl

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646

4747
-include("rabbit.hrl").
4848
-include_lib("kernel/include/inet.hrl").
49+
-include_lib("ssl/src/ssl_record.hrl").
50+
4951

5052
-define(RABBIT_TCP_OPTS, [
5153
binary,
@@ -116,7 +118,26 @@ boot_ssl() ->
116118
end}
117119
| SslOptsConfig]
118120
end,
119-
[start_ssl_listener(Host, Port, SslOpts) || {Host, Port} <- SslListeners],
121+
% In R13B04 and R14A (at least), rc4 is incorrectly implemented.
122+
CipherSuites = proplists:get_value(ciphers,
123+
SslOpts,
124+
ssl:cipher_suites()),
125+
FilteredCipherSuites =
126+
[C || C <- CipherSuites,
127+
begin
128+
SuiteCode =
129+
if is_tuple(C) -> ssl_cipher:suite(C);
130+
is_list(C) -> ssl_cipher:openssl_suite(C)
131+
end,
132+
SP = ssl_cipher:security_parameters(
133+
SuiteCode,
134+
#security_parameters{}),
135+
SP#security_parameters.bulk_cipher_algorithm =/= ?RC4
136+
end],
137+
SslOpts1 = [{ciphers, FilteredCipherSuites}
138+
| [{K, V} || {K, V} <- SslOpts, K =/= ciphers]],
139+
[start_ssl_listener(Host, Port, SslOpts1)
140+
|| {Host, Port} <- SslListeners],
120141
ok
121142
end.
122143

0 commit comments

Comments
 (0)