fix(tls): undefined keyusage

This commit is contained in:
William Yang 2023-10-05 16:24:39 +02:00
parent eb1ab9adfe
commit 90430fa66d
1 changed files with 1 additions and 1 deletions

View File

@ -697,7 +697,7 @@ opt_partial_chain(SslOpts) ->
%% @doc make verify_fun if set. %% @doc make verify_fun if set.
-spec opt_verify_fun(SslOpts :: map()) -> NewSslOpts :: map(). -spec opt_verify_fun(SslOpts :: map()) -> NewSslOpts :: map().
opt_verify_fun(#{verify_peer_ext_key_usage := V} = SslOpts) -> opt_verify_fun(#{verify_peer_ext_key_usage := V} = SslOpts) when V =/= undefined ->
SslOpts#{verify_fun => emqx_const_v2:make_tls_verify_fun(verify_cert_extKeyUsage, V)}; SslOpts#{verify_fun => emqx_const_v2:make_tls_verify_fun(verify_cert_extKeyUsage, V)};
opt_verify_fun(SslOpts) -> opt_verify_fun(SslOpts) ->
SslOpts. SslOpts.