fix(auth_pgsql): Make ssl_opts.versions backward compatible
This commit is contained in:
parent
14ca914068
commit
be771f6cd9
|
@ -67,6 +67,12 @@
|
||||||
{datatype, string}
|
{datatype, string}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
|
%% FIXME: compatible with 4.0-4.2 version format, plan to delete in 5.0
|
||||||
|
{mapping, "auth.pgsql.ssl_opts.tls_versions", "emqx_auth_pgsql.server", [
|
||||||
|
{default, "tlsv1.2"},
|
||||||
|
{datatype, string}
|
||||||
|
]}.
|
||||||
|
|
||||||
{translation, "emqx_auth_pgsql.server", fun(Conf) ->
|
{translation, "emqx_auth_pgsql.server", fun(Conf) ->
|
||||||
{PgHost, PgPort} =
|
{PgHost, PgPort} =
|
||||||
case cuttlefish:conf_get("auth.pgsql.server", Conf) of
|
case cuttlefish:conf_get("auth.pgsql.server", Conf) of
|
||||||
|
@ -88,7 +94,7 @@
|
||||||
{certfile, cuttlefish:conf_get(Prefix ++ ".certfile", Conf, undefined)},
|
{certfile, cuttlefish:conf_get(Prefix ++ ".certfile", Conf, undefined)},
|
||||||
{cacertfile, cuttlefish:conf_get(Prefix ++ ".cacertfile", Conf, undefined),
|
{cacertfile, cuttlefish:conf_get(Prefix ++ ".cacertfile", Conf, undefined),
|
||||||
{versions, [list_to_existing_atom(Value)
|
{versions, [list_to_existing_atom(Value)
|
||||||
||Value <- string:tokens(cuttlefish:conf_get("auth.pgsql.ssl.tls_versions", Conf), " ,")]}}])
|
||Value <- string:tokens(cuttlefish:conf_get(Prefix ++ ".tls_versions", Conf), " ,")]}}])
|
||||||
end,
|
end,
|
||||||
|
|
||||||
%% FIXME: compatible with 4.0-4.2 version format, plan to delete in 5.0
|
%% FIXME: compatible with 4.0-4.2 version format, plan to delete in 5.0
|
||||||
|
|
Loading…
Reference in New Issue