Skip to content

Commit 35bd244

Browse files
do not spawn visibile consoles, hide certutil window (#93)
1 parent 8980c0f commit 35bd244

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

security.go

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"runtime"
2424
"sort"
2525
"strings"
26+
"syscall"
2627
"time"
2728

2829
"go.mozilla.org/pkcs7"
@@ -488,6 +489,7 @@ func loadSystemRoots() (*x509.CertPool, error) {
488489
// Use certutil to download all the root certs.
489490
if needSync {
490491
cmd := exec.Command("certutil", "-syncWithWU", dir)
492+
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
491493
out, err := cmd.Output()
492494
if err != nil {
493495
return roots, err

0 commit comments

Comments
 (0)