]> Sergey Matveev's repositories - tofuproxy.git/blobdiff - verify.go
Small documentation
[tofuproxy.git] / verify.go
index 05fa9e992d775dc8cdaa42f07cbd43bb7234f8db..6c1ed9e2f1e89118838b991dab597dea6d3ae4c2 100644 (file)
--- a/verify.go
+++ b/verify.go
@@ -21,7 +21,6 @@ import (
        "crypto/x509"
        "encoding/pem"
        "fmt"
-       "io/ioutil"
        "log"
        "os"
        "os/exec"
@@ -31,8 +30,13 @@ import (
        "go.cypherpunks.ru/ucspi"
 )
 
+var (
+       CmdCerttool = "certtool"
+       CmdWish     = "wish8.7"
+)
+
 func certInfo(certRaw []byte) string {
-       cmd := exec.Command("certtool", "--certificate-info", "--inder")
+       cmd := exec.Command(CmdCerttool, "--certificate-info", "--inder")
        cmd.Stdin = bytes.NewReader(certRaw)
        out, err := cmd.Output()
        if err != nil {
@@ -156,8 +160,8 @@ grid rowconfigure . 0 -weight 1
 grid columnconfigure . 0 -weight 1
 `)
 
-               cmd := exec.Command("wish8.7")
-               ioutil.WriteFile("/tmp/w.tcl", b.Bytes(), 0666)
+               cmd := exec.Command(CmdWish)
+               // ioutil.WriteFile("/tmp/w.tcl", b.Bytes(), 0666)
                cmd.Stdin = &b
                err = cmd.Run()
                exitError, ok := err.(*exec.ExitError)