fix(bridge-s3): pass SSL options through `convert_certs/2`
This commit is contained in:
parent
c17c788438
commit
8a85d7cb5a
|
@ -1,6 +1,6 @@
|
|||
{application, emqx_bridge_s3, [
|
||||
{description, "EMQX Enterprise S3 Bridge"},
|
||||
{vsn, "0.1.1"},
|
||||
{vsn, "0.1.2"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
|
|
|
@ -22,6 +22,10 @@
|
|||
connector_examples/1
|
||||
]).
|
||||
|
||||
-export([
|
||||
pre_config_update/4
|
||||
]).
|
||||
|
||||
%%-------------------------------------------------------------------------------------------------
|
||||
%% `hocon_schema' API
|
||||
%%-------------------------------------------------------------------------------------------------
|
||||
|
@ -110,3 +114,15 @@ connector_example(put) ->
|
|||
enable_pipelining => 1
|
||||
}
|
||||
}.
|
||||
|
||||
%% Config update
|
||||
|
||||
pre_config_update(Path, _Name, Conf = #{<<"transport_options">> := TransportOpts}, _ConfOld) ->
|
||||
case emqx_connector_ssl:convert_certs(filename:join(Path), TransportOpts) of
|
||||
{ok, NTransportOpts} ->
|
||||
{ok, Conf#{<<"transport_options">> := NTransportOpts}};
|
||||
{error, {bad_ssl_config, Error}} ->
|
||||
{error, Error#{reason => <<"bad_ssl_config">>}}
|
||||
end;
|
||||
pre_config_update(_Path, _Name, Conf, _ConfOld) ->
|
||||
{ok, Conf}.
|
||||
|
|
Loading…
Reference in New Issue