feat: Add opt-in support for proxy CA cert installation (#318)

* feat: Add opt-in support for proxy CA cert installation

* fix: Code review fixes

* fix: Code review fixes

* fix: Code review fixes

* fix: Code review fixes

* fix: Code review fixes

* docs: Add limitation for MacOS MDM script
This commit is contained in:
Abhisek Datta
2026-06-03 23:15:02 +05:30
committed by GitHub
parent c3f3920d2e
commit 4f0db15ede
31 changed files with 1806 additions and 77 deletions
+22
View File
@@ -15,7 +15,9 @@ import (
"github.com/safedep/pmg/internal/audit"
"github.com/safedep/pmg/internal/ui"
"github.com/safedep/pmg/internal/version"
"github.com/safedep/pmg/proxy/certmanager"
"github.com/safedep/pmg/sandbox/platform"
"github.com/safedep/pmg/truststore"
"github.com/spf13/cobra"
)
@@ -143,6 +145,26 @@ func executeSetupInfo() error {
ui.PrintInfoSection("Sandbox", sandboxEntries)
// Certificate Authority section
caStatus, _ := certmanager.InspectCA(cfg.ConfigDir())
caUser, caSystem, _ := truststore.Status(certmanager.CACommonName)
caStatus.UserTrusted, caStatus.SystemTrusted = caUser, caSystem
caEntries := make(map[string]string)
caEntries["Installed"] = strconv.FormatBool(caStatus.KeyPresent && caStatus.CertPresent)
caScope := "none"
if caStatus.SystemTrusted {
caScope = "system"
} else if caStatus.UserTrusted {
caScope = "user"
}
caEntries["Trust Scope"] = caScope
if caStatus.CertPresent {
caEntries["Expires"] = caStatus.NotAfter.Format("2006-01-02")
caEntries["Fingerprint"] = caStatus.Fingerprint
}
ui.PrintInfoSection("Certificate Authority", caEntries)
if cfg.Config.Cloud.Enabled {
cloudEntries := make(map[string]string)
cloudEntries["Enabled"] = "true"