From a3bac2941f2af075404ff0a79f19874413dffb00 Mon Sep 17 00:00:00 2001 From: Michael Neumann Date: Tue, 5 May 2026 16:52:58 +0200 Subject: [PATCH 1/2] Support DragonFly BSD --- ca-certs.opam | 2 +- ca-certs.opam.template | 2 +- lib/ca_certs.ml | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ca-certs.opam b/ca-certs.opam index b5dbfed..4576344 100644 --- a/ca-certs.opam +++ b/ca-certs.opam @@ -48,6 +48,6 @@ build: [ ] tags: ["org:mirage"] depexts: [ - ["ca_root_nss"] {os = "freebsd"} + ["ca_root_nss"] {os = "freebsd" | os = "dragonfly"} ] x-maintenance-intent: [ "(latest)" ] diff --git a/ca-certs.opam.template b/ca-certs.opam.template index c3d5eba..e95eba9 100644 --- a/ca-certs.opam.template +++ b/ca-certs.opam.template @@ -14,6 +14,6 @@ build: [ ] tags: ["org:mirage"] depexts: [ - ["ca_root_nss"] {os = "freebsd"} + ["ca_root_nss"] {os = "freebsd" | os = "dragonfly"} ] x-maintenance-intent: [ "(latest)" ] diff --git a/lib/ca_certs.ml b/lib/ca_certs.ml index 3f8139e..1de4db0 100644 --- a/lib/ca_certs.ml +++ b/lib/ca_certs.ml @@ -45,6 +45,7 @@ let linux_locations = (* from https://golang.org/src/crypto/x509/root_bsd.go *) let openbsd_location = "/etc/ssl/cert.pem" let freebsd_location = "/usr/local/share/certs/ca-root-nss.crt" +let dragonfly_location = "/usr/local/share/certs/ca-root-nss.crt" let macos_keychain_locations = [ @@ -102,6 +103,7 @@ let system_trust_anchors () = match os with | "FreeBSD" -> detect_one freebsd_location | "OpenBSD" -> detect_one openbsd_location + | "DragonFly" -> detect_one dragonfly_location | "Linux" -> detect_list linux_locations | "Darwin" -> macos_keychain_locations From 332e4834a865fccbd34855af56ec6485622f08ab Mon Sep 17 00:00:00 2001 From: Hannes Mehnert Date: Tue, 5 May 2026 17:37:14 +0200 Subject: [PATCH 2/2] DragonFlyBSD: use FreeBSD location --- lib/ca_certs.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ca_certs.ml b/lib/ca_certs.ml index 1de4db0..d0b1926 100644 --- a/lib/ca_certs.ml +++ b/lib/ca_certs.ml @@ -45,7 +45,6 @@ let linux_locations = (* from https://golang.org/src/crypto/x509/root_bsd.go *) let openbsd_location = "/etc/ssl/cert.pem" let freebsd_location = "/usr/local/share/certs/ca-root-nss.crt" -let dragonfly_location = "/usr/local/share/certs/ca-root-nss.crt" let macos_keychain_locations = [ @@ -102,8 +101,8 @@ let system_trust_anchors () = let* os = Bos.OS.Cmd.(run_out cmd |> out_string |> success) in match os with | "FreeBSD" -> detect_one freebsd_location + | "DragonFly" -> detect_one freebsd_location | "OpenBSD" -> detect_one openbsd_location - | "DragonFly" -> detect_one dragonfly_location | "Linux" -> detect_list linux_locations | "Darwin" -> macos_keychain_locations