Skip to content

Commit eef94c7

Browse files
Merge pull request #9843 from rabbitmq/ik-remove-poodle-check
Remove POODLE check
2 parents 4eda2a8 + 9bab2f2 commit eef94c7

File tree

6 files changed

+10
-59
lines changed

6 files changed

+10
-59
lines changed

deps/rabbit/src/rabbit_networking.erl

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
%% Used by TCP-based transports, e.g. STOMP adapter
4040
-export([tcp_listener_addresses/1,
4141
tcp_listener_spec/9, tcp_listener_spec/10, tcp_listener_spec/11,
42-
ensure_ssl/0, fix_ssl_options/1, poodle_check/1]).
42+
ensure_ssl/0, fix_ssl_options/1]).
4343

4444
-export([tcp_listener_started/4, tcp_listener_stopped/4]).
4545

@@ -127,12 +127,7 @@ boot_tls(NumAcceptors, ConcurrentConnsSupsCount) ->
127127
ok;
128128
{ok, SslListeners} ->
129129
SslOpts = ensure_ssl(),
130-
case poodle_check('AMQP') of
131-
ok -> _ = [start_ssl_listener(L, SslOpts, NumAcceptors, ConcurrentConnsSupsCount)
132-
|| L <- SslListeners],
133-
ok;
134-
danger -> ok
135-
end,
130+
_ = [start_ssl_listener(L, SslOpts, NumAcceptors, ConcurrentConnsSupsCount) || L <- SslListeners],
136131
ok
137132
end.
138133

@@ -144,33 +139,6 @@ ensure_ssl() ->
144139
{ok, SslOptsConfig0} = application:get_env(rabbit, ssl_options),
145140
rabbit_ssl_options:fix(SslOptsConfig0).
146141

147-
-spec poodle_check(atom()) -> 'ok' | 'danger'.
148-
149-
poodle_check(Context) ->
150-
{ok, Vsn} = application:get_key(ssl, vsn),
151-
case rabbit_misc:version_compare(Vsn, "5.3", gte) of %% R16B01
152-
true -> ok;
153-
false -> case application:get_env(rabbit, ssl_allow_poodle_attack) of
154-
{ok, true} -> ok;
155-
_ -> log_poodle_fail(Context),
156-
danger
157-
end
158-
end.
159-
160-
log_poodle_fail(Context) ->
161-
rabbit_log:error(
162-
"The installed version of Erlang (~ts) contains the bug OTP-10905,~n"
163-
"which makes it impossible to disable SSLv3. This makes the system~n"
164-
"vulnerable to the POODLE attack. SSL listeners for ~ts have therefore~n"
165-
"been disabled.~n~n"
166-
"You are advised to upgrade to a recent Erlang version; R16B01 is the~n"
167-
"first version in which this bug is fixed, but later is usually~n"
168-
"better.~n~n"
169-
"If you cannot upgrade now and want to re-enable SSL listeners, you can~n"
170-
"set the config item 'ssl_allow_poodle_attack' to 'true' in the~n"
171-
"'rabbit' section of your configuration file.",
172-
[rabbit_misc:otp_release(), Context]).
173-
174142
fix_ssl_options(Config) ->
175143
rabbit_ssl_options:fix(Config).
176144

deps/rabbit_common/src/rabbit_misc.erl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,12 +1180,9 @@ get_proc_name() ->
11801180
{ok, Name}
11811181
end.
11821182

1183-
%% application:get_env/3 is only available in R16B01 or later.
1183+
%% application:get_env/3 is available in R16B01 or later.
11841184
get_env(Application, Key, Def) ->
1185-
case application:get_env(Application, Key) of
1186-
{ok, Val} -> Val;
1187-
undefined -> Def
1188-
end.
1185+
application:get_env(Application, Key, Def).
11891186

11901187
get_channel_operation_timeout() ->
11911188
%% Default channel_operation_timeout set to net_ticktime + 10s to

deps/rabbitmq_mqtt/src/rabbit_mqtt_sup.erl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ init([{Listeners, SslListeners0}]) ->
2828
[] -> {none, 0, []};
2929
_ -> {rabbit_networking:ensure_ssl(),
3030
application:get_env(?APP_NAME, num_ssl_acceptors, 10),
31-
case rabbit_networking:poodle_check('MQTT') of
32-
ok -> SslListeners0;
33-
danger -> []
34-
end}
31+
SslListeners0}
3532
end,
3633
%% Use separate process group scope per RabbitMQ node. This achieves a local-only
3734
%% process group which requires less memory with millions of connections.

deps/rabbitmq_stomp/src/rabbit_stomp_sup.erl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ init([{Listeners, SslListeners0}, Configuration]) ->
2626
[] -> {none, 0, []};
2727
_ -> {rabbit_networking:ensure_ssl(),
2828
application:get_env(rabbitmq_stomp, num_ssl_acceptors, 10),
29-
case rabbit_networking:poodle_check('STOMP') of
30-
ok -> SslListeners0;
31-
danger -> []
32-
end}
29+
SslListeners0}
3330
end,
3431
Flags = #{
3532
strategy => one_for_all,

deps/rabbitmq_stream/src/rabbit_stream_sup.erl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,7 @@ init([]) ->
4444
_ ->
4545
{rabbit_networking:ensure_ssl(),
4646
application:get_env(rabbitmq_stream, num_ssl_acceptors, 10),
47-
case rabbit_networking:poodle_check('STREAM') of
48-
ok ->
49-
SslListeners0;
50-
danger ->
51-
[]
52-
end}
47+
SslListeners0}
5348
end,
5449

5550
Nodes = rabbit_nodes:list_members(),

deps/rabbitmq_web_dispatch/src/rabbit_web_dispatch_sup.erl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,9 @@ init([]) ->
7171
preprocess_config(Options) ->
7272
case proplists:get_value(ssl, Options) of
7373
true -> _ = rabbit_networking:ensure_ssl(),
74-
case rabbit_networking:poodle_check('HTTP') of
75-
ok -> case proplists:get_value(ssl_opts, Options) of
76-
undefined -> auto_ssl(Options);
77-
_ -> fix_ssl(Options)
78-
end;
79-
danger -> {ranch_tcp, transport_config(Options), protocol_config(Options)}
74+
case proplists:get_value(ssl_opts, Options) of
75+
undefined -> auto_ssl(Options);
76+
_ -> fix_ssl(Options)
8077
end;
8178
_ -> {ranch_tcp, transport_config(Options), protocol_config(Options)}
8279
end.

0 commit comments

Comments
 (0)