Merge pull request #6536 from tigercl/fix/authn-ssl

fix(authn): attempt to convert certificate content only when TLS is enabled
This commit is contained in:
tigercl 2021-12-27 09:50:11 +08:00 committed by GitHub
commit d781dc73a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -872,7 +872,7 @@ fill_defaults(Configs) when is_list(Configs) ->
fill_defaults(Config) -> fill_defaults(Config) ->
emqx_authn:check_config(Config, #{only_fill_defaults => true}). emqx_authn:check_config(Config, #{only_fill_defaults => true}).
convert_certs(#{ssl := SSLOpts} = Config) -> convert_certs(#{ssl := #{enable := true} = SSLOpts} = Config) ->
NSSLOpts = lists:foldl(fun(K, Acc) -> NSSLOpts = lists:foldl(fun(K, Acc) ->
case maps:get(K, Acc, undefined) of case maps:get(K, Acc, undefined) of
undefined -> Acc; undefined -> Acc;