Merge pull request #9347 from thalesmg/crl-rename-cfg-rv44
refactor(crl): rename `s/enable_crl_cache/enable_crl_check/g`
This commit is contained in:
commit
6d27e24bb1
|
@ -1554,7 +1554,7 @@ listener.ssl.external.cacertfile = {{ platform_etc_dir }}/certs/cacert.pem
|
|||
##
|
||||
## Value: boolean
|
||||
## Default: false
|
||||
## listener.ssl.external.enable_crl_cache = true
|
||||
## listener.ssl.external.enable_crl_check = true
|
||||
|
||||
## Comma-separated URL list for CRL servers to fetch and cache CRLs
|
||||
## from. Must include the path to the CRL file(s).
|
||||
|
|
|
@ -1702,7 +1702,7 @@ end}.
|
|||
{datatype, {duration, ms}}
|
||||
]}.
|
||||
|
||||
{mapping, "listener.ssl.$name.enable_crl_cache", "emqx.listeners", [
|
||||
{mapping, "listener.ssl.$name.enable_crl_check", "emqx.listeners", [
|
||||
{default, false},
|
||||
{datatype, {enum, [true, false]}}
|
||||
]}.
|
||||
|
@ -2337,7 +2337,7 @@ end}.
|
|||
undefined -> undefined;
|
||||
_ -> {fun emqx_psk:lookup/3, <<>>}
|
||||
end,
|
||||
CRLCheck = case cuttlefish:conf_get(Prefix ++ ".enable_crl_cache", Conf, false) of
|
||||
CRLCheck = case cuttlefish:conf_get(Prefix ++ ".enable_crl_check", Conf, false) of
|
||||
true ->
|
||||
HTTPTimeout = cuttlefish:conf_get(Prefix ++ ".crl_cache_http_timeout", Conf, timer:seconds(15)),
|
||||
%% {crl_check, true} doesn't work
|
||||
|
@ -2374,7 +2374,7 @@ end}.
|
|||
undefined -> undefined;
|
||||
URLs -> string:tokens(URLs, ", ")
|
||||
end,
|
||||
Filter([ {crl_cache_enabled, cuttlefish:conf_get(Prefix ++ ".enable_crl_cache", Conf, false)}
|
||||
Filter([ {crl_check_enabled, cuttlefish:conf_get(Prefix ++ ".enable_crl_check", Conf, false)}
|
||||
, {crl_cache_urls, CRLURLs}
|
||||
])
|
||||
end,
|
||||
|
|
|
@ -187,7 +187,7 @@ collect_urls(Listeners) ->
|
|||
CRLOpts1 =
|
||||
lists:filter(
|
||||
fun(CRLOpts) ->
|
||||
proplists:get_bool(crl_cache_enabled, CRLOpts)
|
||||
proplists:get_bool(crl_check_enabled, CRLOpts)
|
||||
end,
|
||||
CRLOpts0),
|
||||
CRLURLs =
|
||||
|
|
|
@ -306,7 +306,7 @@ find_by_id(Id, [L | Rest]) ->
|
|||
-spec maybe_register_crl_urls([esockd:option()]) -> ok.
|
||||
maybe_register_crl_urls(Options) ->
|
||||
CRLOptions = proplists:get_value(crl_options, Options, []),
|
||||
case proplists:get_bool(crl_cache_enabled, CRLOptions) of
|
||||
case proplists:get_bool(crl_check_enabled, CRLOptions) of
|
||||
false ->
|
||||
ok;
|
||||
true ->
|
||||
|
|
|
@ -80,7 +80,7 @@ end_per_testcase(TestCase, Config)
|
|||
emqx_crl_cache_http_server:stop(ServerPid),
|
||||
emqx_ct_helpers:stop_apps([]),
|
||||
emqx_ct_helpers:change_emqx_opts(
|
||||
ssl_twoway, [ {crl_options, [ {crl_cache_enabled, false}
|
||||
ssl_twoway, [ {crl_options, [ {crl_check_enabled, false}
|
||||
, {crl_cache_urls, []}
|
||||
]}
|
||||
]),
|
||||
|
@ -90,7 +90,7 @@ end_per_testcase(TestCase, Config)
|
|||
end_per_testcase(t_not_cached_and_unreachable, _Config) ->
|
||||
emqx_ct_helpers:stop_apps([]),
|
||||
emqx_ct_helpers:change_emqx_opts(
|
||||
ssl_twoway, [ {crl_options, [ {crl_cache_enabled, false}
|
||||
ssl_twoway, [ {crl_options, [ {crl_check_enabled, false}
|
||||
, {crl_cache_urls, []}
|
||||
]}
|
||||
]),
|
||||
|
@ -194,7 +194,7 @@ setup_crl_options(Config, #{is_cached := IsCached}) ->
|
|||
, {crl_cache,
|
||||
{ssl_crl_cache, {internal, [{http, timer:seconds(15)}]}}}
|
||||
]}
|
||||
, {crl_options, [ {crl_cache_enabled, true}
|
||||
, {crl_options, [ {crl_check_enabled, true}
|
||||
, {crl_cache_urls, URLs}
|
||||
]}
|
||||
]),
|
||||
|
|
Loading…
Reference in New Issue