X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=tls%2Ftlsauth.go;fp=tls%2Ftlsauth.go;h=bca76efc73514703fdb26b46c76a04411c343ca5;hb=c1f841e8a5e4c30710cdb2e57fd87cba9d79b97b;hp=cb8fe9833800979a5708379f317c3f7b7507c3a2;hpb=539e5df5806bd22c8eaddeb0409e6b8b187eda4c;p=tofuproxy.git diff --git a/tls/tlsauth.go b/tls/tlsauth.go index cb8fe98..bca76ef 100644 --- a/tls/tlsauth.go +++ b/tls/tlsauth.go @@ -57,7 +57,7 @@ func (g *ClientCertificateGetter) get( sigSchemes = append(sigSchemes, ss.String()) } var b bytes.Buffer - b.WriteString(fmt.Sprintf(` + fmt.Fprintf(&b, ` tk_setPalette grey wm title . "TLS client authentication: %s" @@ -94,7 +94,7 @@ foreach sigScheme {%s} { g.host, ucspi.TLSVersion(cri.Version), strings.Join(sigSchemes, " "), - )) + ) ents, err := os.ReadDir(CCerts) if err != nil { @@ -120,7 +120,7 @@ foreach sigScheme {%s} { Certificate: [][]byte{cert.Raw}, PrivateKey: prv, }) - b.WriteString(fmt.Sprintf(".lb insert end \"%d: %s\"\n", i+1, cert.Subject)) + fmt.Fprintf(&b, ".lb insert end \"%d: %s\"\n", i+1, cert.Subject) } // os.WriteFile("/tmp/tls-auth-dialog.tcl", b.Bytes(), 0666) cmd := exec.Command(CmdWish)