Merge pull request #6219 from tigercl/fix/authz-certs

fix(authz): fix badmatch when reading certs
This commit is contained in:
tigercl 2021-11-19 11:25:29 +08:00 committed by GitHub
commit a074cf24d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -437,10 +437,11 @@ update_config(Cmd, Sources) ->
read_certs(#{<<"ssl">> := SSL} = Source) -> read_certs(#{<<"ssl">> := SSL} = Source) ->
case emqx_tls_lib:file_content_as_options(SSL) of case emqx_tls_lib:file_content_as_options(SSL) of
{ok, NewSSL} -> Source#{<<"ssl">> => NewSSL};
{error, Reason} -> {error, Reason} ->
?SLOG(error, Reason#{msg => failed_to_readd_ssl_file}), ?SLOG(error, Reason#{msg => failed_to_readd_ssl_file}),
throw(failed_to_readd_ssl_file) throw(failed_to_readd_ssl_file);
NewSSL ->
Source#{<<"ssl">> => NewSSL}
end; end;
read_certs(Source) -> Source. read_certs(Source) -> Source.