Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent logs #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/ca_certs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ let windows_trust_anchors () =
match X509.Certificate.decode_der cert with
| Ok cert -> cert :: acc
| Error (`Msg msg) ->
Log.warn (fun m -> m "Ignoring undecodable trust anchor: %s." msg);
Log.debug (fun m -> m "Ignoring undecodable trust anchor: %s." msg);
Log.debug (fun m ->
m "Full certificate:@.%a" (Ohex.pp_hexdump ()) cert);
acc)
Expand All @@ -86,10 +86,10 @@ let trust_anchors () =
(Sys.getenv_opt "SSL_CERT_FILE", Sys.getenv_opt "NIX_SSL_CERT_FILE")
with
| Some x, _ ->
Log.info (fun m -> m "using %s (from SSL_CERT_FILE)" x);
Log.debug (fun m -> m "using %s (from SSL_CERT_FILE)" x);
detect_one x
| _, Some x ->
Log.info (fun m -> m "using %s (from NIX_SSL_CERT_FILE)" x);
Log.debug (fun m -> m "using %s (from NIX_SSL_CERT_FILE)" x);
detect_one x
| None, None -> (
let cmd = Bos.Cmd.(v "uname" % "-s") in
Expand All @@ -112,7 +112,7 @@ let decode_pem_multiple data =
(fun acc -> function
| Ok t -> t :: acc
| Error (`Msg msg) ->
Log.warn (fun m -> m "Ignoring undecodable trust anchor: %s." msg);
Log.debug (fun m -> m "Ignoring undecodable trust anchor: %s." msg);
acc)
[] data

Expand Down
Loading