Skip to content

Commit 404c261

Browse files
committed
add cert install on windows
1 parent 484433a commit 404c261

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

certificates/certificates.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,12 @@ func InstallCertificates(certsDir *paths.Path) {
272272
log.Errorf("cannot install certificate in the system keychain: %s", err)
273273
}
274274
log.Infof("stdout: %s", stdoutStderr)
275+
case "windows":
276+
stdoutStderr, err := exec.Command("certmgr.exe", "-add", certsDir.String()+`/ca.cert.cer`, "-s", "-r", "currentUser", "root").CombinedOutput()
277+
if err != nil {
278+
log.Errorf("cannot install certificate in the system keychain: %s", err)
279+
}
280+
log.Infof("stdout: %s", stdoutStderr)
275281
default:
276282
log.Infof("cannot install certificate: OS not supported")
277283
}

0 commit comments

Comments
 (0)