Packages
tls_certificate_check
1.34.0
1.35.0
1.34.0
1.33.0
1.32.4
1.32.3
1.32.2
1.32.1
1.32.0
1.31.0
1.30.0
1.29.0
1.28.0
1.27.0
1.26.0
1.25.0
1.24.0
1.23.0
1.22.1
1.22.0
1.21.0
1.20.0
1.19.0
1.18.1
1.18.0
1.17.4
1.17.3
1.17.2
1.17.1
1.17.0
1.16.0
1.15.0
1.14.0
1.13.0
1.12.0
1.11.0
1.10.0
1.9.0
1.8.0
1.7.0
1.6.0
retired
1.5.0
retired
1.4.0
retired
1.3.0
retired
1.2.0
retired
1.1.1
retired
1.1.0
retired
1.0.2
retired
1.0.1
retired
1.0.0
retired
1.0.0-beta
retired
CA store + Partial chain handler
Current section
Files
Jump to
Current section
Files
tls_certificate_check
rebar.config.script
rebar.config.script
% -*- mode: erlang; -*- vim: set ft=erlang:
case erlang:function_exported(rebar3, main, 1)
orelse erlang:function_exported('Elixir.Mix', module_info, 1)
orelse {deps, lists:keyfind(deps, 1, CONFIG)}
of
true ->
% either rebar3 or mix
begin
TakeOutProjPlugin
= fun (Name, Config) ->
{project_plugins, ProjPlugins}
= lists:keyfind(project_plugins, 1, Config),
{value, {_, Version}, RemainingProjPlugins}
= lists:keytake(Name, 1, ProjPlugins),
% logger:notice("Dropping proj plugin '~ts' ~ts", [Name, Version]),
_UpdatedConfig
= lists:keystore(project_plugins, 1, Config,
{project_plugins, RemainingProjPlugins})
end,
TakeOutElvis
= fun (Config) ->
TakeOutProjPlugin(rebar3_lint, Config)
end,
TakeOutErlFmt
= fun (Config) ->
TakeOutProjPlugin(erlfmt, Config)
end,
TakeOutHank
= fun (Config) ->
TakeOutProjPlugin(rebar3_hank, Config)
end,
OtpRelease = erlang:system_info(otp_release),
try list_to_integer(OtpRelease) of
IntRelease when IntRelease =< 25 ->
% Take dev helpers away as they're no longer compatible with OTP 25
TakeOutHank(TakeOutErlFmt(TakeOutElvis(CONFIG)));
%
IntRelease when IntRelease =< 26 ->
% -doc tags wreak havok
TakeOutErlFmt(CONFIG);
%
_ ->
CONFIG
catch
error:badarg ->
logger:warning("Don't now how to compare to OTP release: ~tp", [OtpRelease]),
CONFIG
end
end;
%
%
%
{deps, false} ->
% no override needed
CONFIG;
%
%
%
{deps, {_, Deps}} ->
%
% rebar 2.x - convert deps to old format
% THIS MAY STOP WORKING AT ANY MOMENT.
% USE AT YOUR OWN RISK.
%
error_logger:warning_msg("~n~n"
"\t!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~n"
"\t!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~n"
"\t*********************************************************************~n"
"\t~n"
"\t[tls_certificate_check] You're **strongly** incentivized to use `rebar3`.~n"
"\tCompatibility with rebar 2 is unmaintained and will be removed in the near future.~n"
"\t~n"
"\t*********************************************************************~n"
"\t!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~n"
"\t!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~n"),
{_, ErlOpts} = lists:keyfind(erl_opts, 1, CONFIG),
OverriddenErlOpts = ErlOpts -- [warn_missing_spec],
OverriddenSortableDeps =
lists:foldr(
fun ({ssl_verify_fun, Version}, Acc) ->
[{3, {ssl_verify_fun, ".*", {git, "https://github.com/deadtrickster/ssl_verify_fun.erl.git",
{tag, Version}}}}
| Acc];
({Name, Version}, _Acc) ->
MsgErrorIo = io_lib:format("Hex package '~ts', version \"~ts\": missing Git repo",
[Name, Version]),
error(MsgErrorIo)
end,
[], Deps),
OverriddenDeps = [element(2, Pair) || Pair <- lists:keysort(1, OverriddenSortableDeps)],
Config2 = lists:keystore(deps, 1, CONFIG, {deps,OverriddenDeps}),
lists:keystore(erl_opts, 1, Config2, {erl_opts,OverriddenErlOpts})
end.