Remove NO_CUSTOMIZE_HOSTNAME_CHECK

This commit is contained in:
Badlop
2025-11-12 21:05:52 +01:00
parent c472aad566
commit ebfcf3b5db
3 changed files with 3 additions and 13 deletions
-1
View File
@@ -77,7 +77,6 @@ defmodule Ejabberd.MixProject do
result = [{:d, :ELIXIR_ENABLED}] ++
cond_options() ++
Enum.map(includes, fn (path) -> {:i, path} end) ++
if_version_below(~c"21", [{:d, :NO_CUSTOMIZE_HOSTNAME_CHECK}]) ++
if_version_below(~c"23", [{:d, :USE_OLD_CRYPTO_HMAC}]) ++
if_version_below(~c"23", [{:d, :USE_OLD_PG2}]) ++
if_version_below(~c"24", [{:d, :COMPILER_REPORTS_ONLY_LINES}]) ++
-1
View File
@@ -112,7 +112,6 @@
{erl_opts, [nowarn_deprecated_function,
{i, "include"},
{if_version_below, "21", {d, 'NO_CUSTOMIZE_HOSTNAME_CHECK'}},
{if_version_below, "23", {d, 'USE_OLD_CRYPTO_HMAC'}},
{if_version_below, "23", {d, 'USE_OLD_PG2'}},
{if_version_below, "24", {d, 'COMPILER_REPORTS_ONLY_LINES'}},
+3 -11
View File
@@ -1036,20 +1036,12 @@ polish([H | T], Res,
polish(T, Res, [H | Ref]);
polish([], Res, Ref) -> {Res, Ref}.
-ifdef(NO_CUSTOMIZE_HOSTNAME_CHECK).
check_hostname_opt(TLSOpts) ->
TLSOpts.
-else.
check_hostname_opt(TLSOpts) ->
MatchFun = public_key:pkix_verify_hostname_match_fun(https),
[{customize_hostname_check, [{match_fun, MatchFun}]} | TLSOpts].
-endif.
host_tls_options(Host, TLSOpts) ->
case proplists:get_value(verify, TLSOpts) of
verify_peer ->
check_hostname_opt([{server_name_indication, Host} | TLSOpts]);
TLSOpts2 = [{server_name_indication, Host} | TLSOpts],
MatchFun = public_key:pkix_verify_hostname_match_fun(https),
[{customize_hostname_check, [{match_fun, MatchFun}]} | TLSOpts2];
_ ->
TLSOpts
end.