aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src
diff options
context:
space:
mode:
authorMagnus Henoch <[email protected]>2015-12-08 12:52:30 +0000
committerMagnus Henoch <[email protected]>2016-01-12 14:51:14 +0000
commit5ee629684383f3931827effaca70a12bc5d4cb2a (patch)
tree3e4bccada0f590164a3dd06ae56372caeb6295fc /lib/ssl/src
parenta16b7d63cc665dca90305b146c15de04487808db (diff)
downloadotp-5ee629684383f3931827effaca70a12bc5d4cb2a.tar.gz
otp-5ee629684383f3931827effaca70a12bc5d4cb2a.tar.bz2
otp-5ee629684383f3931827effaca70a12bc5d4cb2a.zip
TLS distribution: support inet_dist_connect_options
Allow adding extra options for outgoing TLS distribution connnections, as supported for plain TCP connections.
Diffstat (limited to 'lib/ssl/src')
-rw-r--r--lib/ssl/src/ssl_tls_dist_proxy.erl10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/ssl/src/ssl_tls_dist_proxy.erl b/lib/ssl/src/ssl_tls_dist_proxy.erl
index d384264b53..afe0abb27f 100644
--- a/lib/ssl/src/ssl_tls_dist_proxy.erl
+++ b/lib/ssl/src/ssl_tls_dist_proxy.erl
@@ -89,6 +89,14 @@ listen_options(Opts0) ->
Opts1
end.
+connect_options(Opts) ->
+ case application:get_env(kernel, inet_dist_connect_options) of
+ {ok,ConnectOpts} ->
+ lists:ukeysort(1, ConnectOpts ++ Opts);
+ _ ->
+ Opts
+ end.
+
%%====================================================================
%% gen_server callbacks
%%====================================================================
@@ -222,7 +230,7 @@ try_connect(Port) ->
setup_proxy(Ip, Port, Parent) ->
process_flag(trap_exit, true),
- Opts = get_ssl_options(client),
+ Opts = connect_options(get_ssl_options(client)),
case ssl:connect(Ip, Port, [{active, true}, binary, {packet,?PPRE}, nodelay()] ++ Opts) of
{ok, World} ->
{ok, ErtsL} = gen_tcp:listen(0, [{active, true}, {ip, {127,0,0,1}}, binary, {packet,?PPRE}]),