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

Method init

truststore/java.go:32–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30}
31
32func (s *Java) init() {
33 s.inito.Do(func() {
34 keytoolCommand := "keytool"
35 if runtime.GOOS == "windows" {
36 keytoolCommand = "keytool.exe"
37 }
38
39 if keytoolPath := filepath.Join(s.JavaHomeDir, "bin", keytoolCommand); binaryExists(s.SysFS, keytoolPath) {
40 s.keytoolPath = keytoolPath
41 }
42
43 if cacertsPath := filepath.Join(s.JavaHomeDir, "lib", "security", "cacerts"); pathExists(s.SysFS, cacertsPath) {
44 s.cacertsPath = cacertsPath
45 }
46
47 if cacertsPath := filepath.Join(s.JavaHomeDir, "jre", "lib", "security", "cacerts"); pathExists(s.SysFS, cacertsPath) {
48 s.cacertsPath = cacertsPath
49 }
50 })
51}
52
53func (s *Java) CheckCA(ca *CA) (bool, error) {
54 s.init()

Callers 3

CheckCAMethod · 0.95
InstallCAMethod · 0.95
UninstallCAMethod · 0.95

Calls 2

binaryExistsFunction · 0.85
pathExistsFunction · 0.85

Tested by

no test coverage detected