X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;ds=sidebyside;f=cmd%2Ftlsc%2Fmain.go;h=6985e5cfcacab5f566655309849b0e6aab2d86ec;hb=286cb3841b5d9e0b807bd3444d3ea65ba82e2c75;hp=4f432cf7e0f1d2863e182bcbf6b4fd7aea568bf2;hpb=32dd5994ea99710340a8845140d5cc4b10fec0fd;p=ucspi.git diff --git a/cmd/tlsc/main.go b/cmd/tlsc/main.go index 4f432cf..6985e5c 100644 --- a/cmd/tlsc/main.go +++ b/cmd/tlsc/main.go @@ -41,6 +41,7 @@ func main() { prvPath := flag.String("key", "", "Path to client PKCS#8 private key") casPath := flag.String("ca", "", "Path to CA certificates file") hostname := flag.String("name", "example.com", "Expected server's hostname") + insecure := flag.Bool("insecure", false, "Insecure mode") fpr := flag.String("fpr", "", "Expected SHA256 hash of server certificate's SPKI") flag.Usage = func() { fmt.Fprintf(os.Stderr, `Usage: tcpclient host port tlsc -name expected.name @@ -59,7 +60,7 @@ func main() { } cfg := &tls.Config{} - if *hostname == "" || *onlyShow { + if *hostname == "" || *onlyShow || *insecure { cfg.InsecureSkipVerify = true } if *hostname != "" {