forked from quic-go/quic-go
add a flag to skip certificate verification to the example client
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
verbose := flag.Bool("v", false, "verbose")
|
verbose := flag.Bool("v", false, "verbose")
|
||||||
quiet := flag.Bool("q", false, "don't print the data")
|
quiet := flag.Bool("q", false, "don't print the data")
|
||||||
|
insecure := flag.Bool("insecure", false, "skip certificate verification")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
urls := flag.Args()
|
urls := flag.Args()
|
||||||
|
|
||||||
@@ -31,6 +32,7 @@ func main() {
|
|||||||
roundTripper := &http3.RoundTripper{
|
roundTripper := &http3.RoundTripper{
|
||||||
TLSClientConfig: &tls.Config{
|
TLSClientConfig: &tls.Config{
|
||||||
RootCAs: testdata.GetRootCA(),
|
RootCAs: testdata.GetRootCA(),
|
||||||
|
InsecureSkipVerify: *insecure,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
defer roundTripper.Close()
|
defer roundTripper.Close()
|
||||||
|
|||||||
Reference in New Issue
Block a user