From 8b9205062b26199bff341ed479100c41cccce42e Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Thu, 8 Jun 2017 12:11:37 +0200 Subject: [PATCH] common/test/client: Do not verify TLS certs for testing We will commonly use self-signed certs. --- src/github.com/matrix-org/dendrite/common/test/client.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/github.com/matrix-org/dendrite/common/test/client.go b/src/github.com/matrix-org/dendrite/common/test/client.go index 1d2b478d8..d8f4fd01c 100644 --- a/src/github.com/matrix-org/dendrite/common/test/client.go +++ b/src/github.com/matrix-org/dendrite/common/test/client.go @@ -15,6 +15,7 @@ package test import ( + "crypto/tls" "fmt" "io" "io/ioutil" @@ -71,6 +72,11 @@ func CanonicalJSONInput(jsonData []string) []string { func (r *Request) Do() error { client := &http.Client{ Timeout: 5 * time.Second, + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: true, + }, + }, } res, err := client.Do(r.Req) if err != nil {