Merge pull request #1920 from lucas-clemente/insecure-client

add a flag to skip certificate verification to the example client
This commit is contained in:
Marten Seemann
2019-05-21 17:57:45 +01:00
committed by GitHub

View File

@@ -16,6 +16,7 @@ import (
func main() {
verbose := flag.Bool("v", false, "verbose")
quiet := flag.Bool("q", false, "don't print the data")
insecure := flag.Bool("insecure", false, "skip certificate verification")
flag.Parse()
urls := flag.Args()
@@ -30,7 +31,8 @@ func main() {
roundTripper := &http3.RoundTripper{
TLSClientConfig: &tls.Config{
RootCAs: testdata.GetRootCA(),
RootCAs: testdata.GetRootCA(),
InsecureSkipVerify: *insecure,
},
}
defer roundTripper.Close()