(ca *CA)
| 89 | } |
| 90 | |
| 91 | func (s *Java) InstallCA(ca *CA) (bool, error) { |
| 92 | s.init() |
| 93 | |
| 94 | if s.keytoolPath == "" { |
| 95 | return false, Error{ |
| 96 | Op: OpInstall, |
| 97 | Warning: ErrNoKeytool, |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | args := []string{ |
| 102 | "-importcert", "-noprompt", |
| 103 | "-keystore", s.cacertsPath, |
| 104 | "-storepass", s.StorePass, |
| 105 | "-file", ca.FilePath, |
| 106 | "-alias", ca.UniqueName, |
| 107 | } |
| 108 | |
| 109 | if out, err := s.execKeytool(s.SysFS.Command(s.keytoolPath, args...)); err != nil { |
| 110 | return false, fatalCmdErr(err, "keytool -importcert", out) |
| 111 | } |
| 112 | return true, nil |
| 113 | } |
| 114 | |
| 115 | func (s *Java) UninstallCA(ca *CA) (bool, error) { |
| 116 | s.init() |
nothing calls this directly
no test coverage detected