func (m *mkcert) Run(args []string) { m.CAROOT = getCAROOT() if m.CAROOT == "" { log.Fatalln("ERROR: failed to find the default CA location, set one as the CAROOT env var") } fatalIfErr(os.MkdirAll(m.CAROOT, 0755), "failed to create the CAROOT") m.loadCA()
if m.installMode { m.install() if len(args) == 0 { return } } else { var warning bool if !m.checkPlatform() { warning = true log.Println("Warning: the local CA is not installed in the system trust store! ⚠+")
} else if m.uninstallMode { m.uninstall() return } if hasNSS && CertutilInstallHelp != "" && !m.checkNSS() { warning = true log.Printf("Warning: the local CA is not installed in the %s trust store! ⚠+", NSSBrowsers) } if hasJava && !m.checkJava() { warning = true log.Println("Warning: the local CA is not installed in the Java trust store! ⚠+") } if warning { log.Println("Run \"mkcert -install\" to avoid verification errors ‼+") } }
if len(args) == 0 { log.Printf("\n%s", usage) return }
punycode, err := idna.ToASCII(name) if err != nil { log.Fatalf("ERROR: %q is not a valid hostname or IP: %s", name, err) } args[i] = punycode if !hostnameRegexp.MatchString(punycode) { log.Fatalf("ERROR: %q is not a valid hostname or IP", name) } }hostnameRegexp := regexp.MustCompile(`(?i)^(\*\.)?[0-9a-z_-]([0-9a-z._-]*[0-9a-z_-])?$`) for i, name := range args { if ip := net.ParseIP(name); ip != nil { continue } m.makeCert(args)
}
if m.installMode { m.install() if len(args) == 0 { return } } else { var warning bool if !m.checkPlatform() { warning = true log.Println("Warning: the local CA is not installed in the system trust store! ⚠+")
} else if m.uninstallMode { m.uninstall() return } if hasNSS && CertutilInstallHelp != "" && !m.checkNSS() { warning = true log.Printf("Warning: the local CA is not installed in the %s trust store! ⚠+", NSSBrowsers) } if hasJava && !m.checkJava() { warning = true log.Println("Warning: the local CA is not installed in the Java trust store! ⚠+") } if warning { log.Println("Run \"mkcert -install\" to avoid verification errors ‼+") } }
if len(args) == 0 { log.Printf("\n%s", usage) return }
punycode, err := idna.ToASCII(name) if err != nil { log.Fatalf("ERROR: %q is not a valid hostname or IP: %s", name, err) } args[i] = punycode if !hostnameRegexp.MatchString(punycode) { log.Fatalf("ERROR: %q is not a valid hostname or IP", name) } }hostnameRegexp := regexp.MustCompile(`(?i)^(\*\.)?[0-9a-z_-]([0-9a-z._-]*[0-9a-z_-])?$`) for i, name := range args { if ip := net.ParseIP(name); ip != nil { continue } m.makeCert(args)
}
아는놈은 다 알거고. 수고해라
Program received signal SIGSEGV, Segmentation fault. 0x1c0005c2 in main ()
덕분에 다녀왓다 - dc App