tlstun

simple go program to add tls support to other listeners
git clone https://git.parazyd.org/tlstun
Log | Files | Refs | README | LICENSE

commit efc47c5928a09f8656e136b97a11979f0d94ea32
parent e1c7528220785e14271e92ee4e38575061d4b6c3
Author: parazyd <parazyd@dyne.org>
Date:   Wed, 11 Sep 2019 19:29:10 +0200

Use fmt instead of errors to return an error.

Diffstat:
Mtlstun.go | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tlstun.go b/tlstun.go @@ -23,8 +23,8 @@ package main import ( "crypto/tls" "crypto/x509" - "errors" "flag" + "fmt" "io" "io/ioutil" "log" @@ -58,7 +58,7 @@ func tlsConfig(cert, key string) (*tls.Config, error) { return nil, err } if !certpool.AppendCertsFromPEM(pem) { - return nil, errors.New("can not parse client certificate authority") + return nil, fmt.Errorf("can not parse client certificate authority") } tlscfg.ClientCAs = certpool tlscfg.ClientAuth = tls.RequireAndVerifyClientCert