diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2013-10-15 14:35:28 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2013-10-15 14:35:28 +0100 |
commit | e3054241a5cfd2182676538f3e7b0614c495e3ba (patch) | |
tree | 5e9a1b5c5fdca7e4f8eca8c2bea022d02b0d0d2a | |
parent | b0300ecc3e0f75edabb201840084f7b9dbfc43ed (diff) | |
parent | e11db42252041c6bb7f3fa6b2b50bdb64a3a67bf (diff) | |
download | rabbitmq-server-e3054241a5cfd2182676538f3e7b0614c495e3ba.tar.gz |
Merge bug25809
-rw-r--r-- | src/rabbit_networking.erl | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/rabbit_networking.erl b/src/rabbit_networking.erl index 46cfabe3..91be4dcb 100644 --- a/src/rabbit_networking.erl +++ b/src/rabbit_networking.erl @@ -149,14 +149,22 @@ ensure_ssl() -> ok = app_utils:start_applications(SslAppsConfig), {ok, SslOptsConfig} = application:get_env(rabbit, ssl_options), - % unknown_ca errors are silently ignored prior to R14B unless we - % supply this verify_fun - remove when at least R14B is required - case proplists:get_value(verify, SslOptsConfig, verify_none) of - verify_none -> SslOptsConfig; - verify_peer -> [{verify_fun, fun([]) -> true; - ([_|_]) -> false - end} - | SslOptsConfig] + case rabbit_misc:pget(verify_fun, SslOptsConfig) of + {Module, Function} -> + rabbit_misc:pset(verify_fun, + fun (ErrorList) -> + Module:Function(ErrorList) + end, SslOptsConfig); + undefined -> + % unknown_ca errors are silently ignored prior to R14B unless we + % supply this verify_fun - remove when at least R14B is required + case proplists:get_value(verify, SslOptsConfig, verify_none) of + verify_none -> SslOptsConfig; + verify_peer -> [{verify_fun, fun([]) -> true; + ([_|_]) -> false + end} + | SslOptsConfig] + end end. ssl_transform_fun(SslOpts) -> |