diff options
author | Essien Ita Essien <essiene@gmail.com> | 2008-12-28 23:19:53 +0100 |
---|---|---|
committer | Essien Ita Essien <essiene@gmail.com> | 2008-12-28 23:19:53 +0100 |
commit | d8e50e32f969acae7aa9ea8304301c6bdbd26d2a (patch) | |
tree | 2d2af90edfab3415faa05c0b82afc77329176ed5 /src/rabbit_networking.erl | |
parent | 2335a55cc26f73249f05f4ad6f7f5763d6745aaf (diff) | |
download | rabbitmq-server-d8e50e32f969acae7aa9ea8304301c6bdbd26d2a.tar.gz |
Remove the hardcoded ssl options, and read them in from the app env
Diffstat (limited to 'src/rabbit_networking.erl')
-rw-r--r-- | src/rabbit_networking.erl | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/rabbit_networking.erl b/src/rabbit_networking.erl index 8a4ce7a9..360a9f0e 100644 --- a/src/rabbit_networking.erl +++ b/src/rabbit_networking.erl @@ -31,7 +31,7 @@ -module(rabbit_networking). --export([start/0, start_tcp_listener/2, start_ssl_listener/2, +-export([start/0, start_tcp_listener/2, start_ssl_listener/3, stop_tcp_listener/2, on_node_down/1, active_listeners/0, node_listeners/1, connections/0, connection_info/1, connection_info/2, connection_info_all/0, connection_info_all/1]). @@ -52,13 +52,6 @@ %% {delay_send, true}, {exit_on_close, false} ]). - --define(RABBIT_SSL_OPTS, [ - {verify, 0}, - {cacertfile, "/etc/rabbitmq/cacerts.pem"}, - {certfile, "/etc/rabbitmq/cert.pem"}, - {keyfile, "/etc/rabbitmq/key.pem"} - ]). %%---------------------------------------------------------------------------- -ifdef(use_specs). @@ -125,7 +118,7 @@ start_tcp_listener(Host, Port) -> transient, infinity, supervisor, [tcp_listener_sup]}), ok. -start_ssl_listener(Host, Port) -> +start_ssl_listener(Host, Port, SSlOpts) -> {IPAddress, Name} = check_tcp_listener_address(rabbit_tcp_listener_sup, Host, Port), {ok,_} = supervisor:start_child( rabbit_sup, @@ -134,7 +127,7 @@ start_ssl_listener(Host, Port) -> [IPAddress, Port, ?RABBIT_TCP_OPTS, {?MODULE, tcp_listener_started, []}, {?MODULE, tcp_listener_stopped, []}, - {?MODULE, ssl_connection_upgrade, [?RABBIT_SSL_OPTS]}]}, + {?MODULE, ssl_connection_upgrade, [SSlOpts]}]}, transient, infinity, supervisor, [tcp_listener_sup]}), ok. |