MCPcopy Create free account
hub / github.com/anchordotdev/cli / execCertutil

Method execCertutil

truststore/nss.go:384–390  ·  view source on GitHub ↗

execCertutil will execute a "certutil" command and if needed re-execute the command with commandWithSudo to work around file permissions.

(path string, arg ...string)

Source from the content-addressed store, hash-verified

382// execCertutil will execute a "certutil" command and if needed re-execute
383// the command with commandWithSudo to work around file permissions.
384func (s *NSS) execCertutil(path string, arg ...string) ([]byte, error) {
385 out, err := s.SysFS.Exec(s.SysFS.Command(path, arg...))
386 if err != nil && bytes.Contains(out, []byte(certUtilSecReadOnlyOutput)) && runtime.GOOS != "windows" {
387 out, err = s.SysFS.SudoExec(s.SysFS.Command(path, arg...))
388 }
389 return out, err
390}
391
392func (s *NSS) forEachNSSProfile(f func(profile string) error) (found int, err error) {
393 var profiles []string

Callers 2

InstallCAMethod · 0.95
UninstallCAMethod · 0.95

Calls 3

ExecMethod · 0.65
CommandMethod · 0.65
SudoExecMethod · 0.65

Tested by

no test coverage detected