File 5242-Log-warning-when-we-can-not-load-certs-from-System.k.patch of Package erlang
From e461e0385494aa795e5a056b43bde0de7c01cd42 Mon Sep 17 00:00:00 2001
From: Bryan Paxton <bryan@starbelly.io>
Date: Fri, 22 Nov 2024 10:29:56 -0600
Subject: [PATCH 2/2] Log warning when we can not load certs from
System.keychain
---
lib/public_key/src/pubkey_os_cacerts.erl | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/public_key/src/pubkey_os_cacerts.erl b/lib/public_key/src/pubkey_os_cacerts.erl
index e21681e03f..3e23079f7c 100644
--- a/lib/public_key/src/pubkey_os_cacerts.erl
+++ b/lib/public_key/src/pubkey_os_cacerts.erl
@@ -25,6 +25,7 @@
-include("public_key.hrl").
-include_lib("kernel/include/file.hrl").
+-include_lib("kernel/include/logger.hrl").
-export([load/0, load/1, get/0, clear/0, format_error/2]).
-on_load(on_load/0).
@@ -179,7 +180,9 @@ load_darwin() ->
{ok, Bin2} ->
decode_result(<<Bin1/binary, Bin2/binary>>);
Err ->
- Err
+ ?LOG_WARNING(
+ "Unable to load additional OS certificates from System.keychain : ~p~n", [Err]),
+ decode_result(Bin1)
end;
Err ->
Err
--
2.43.0