fix(ssl): fix ssl option

This commit is contained in:
zhouzb 2021-01-27 18:31:56 +08:00 committed by Zaiming Shi
parent b5c435e211
commit a631a2d64f
2 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ translate_env(EnvName) ->
"http" ->
[{transport_opts, [Inet]}];
"https" ->
CACertFile = application:get_env(?APP, cafile, undefined),
CACertFile = application:get_env(?APP, cacertfile, undefined),
CertFile = application:get_env(?APP, certfile, undefined),
KeyFile = application:get_env(?APP, keyfile, undefined),
TLSOpts = lists:filter(fun({_K, V}) when V =:= <<>> ->

View File

@ -88,7 +88,7 @@ set_special_configs(emqx_auth_http, Schema, Inet) ->
%% @private
set_https_client_opts() ->
SSLOpt = emqx_ct_helpers:client_ssl_twoway(),
application:set_env(emqx_auth_http, cafile, proplists:get_value(cacertfile, SSLOpt, undefined)),
application:set_env(emqx_auth_http, cacertfile, proplists:get_value(cacertfile, SSLOpt, undefined)),
application:set_env(emqx_auth_http, certfile, proplists:get_value(certfile, SSLOpt, undefined)),
application:set_env(emqx_auth_http, keyfile, proplists:get_value(keyfile, SSLOpt, undefined)).