From 7a767e423da6f4a28a05d38b6186953e46f7ba73 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 3 Jul 2018 17:26:06 +0100 Subject: [PATCH] Don't verify self-signed AS certificates --- .../dendrite/appservice/workers/transaction_scheduler.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/github.com/matrix-org/dendrite/appservice/workers/transaction_scheduler.go b/src/github.com/matrix-org/dendrite/appservice/workers/transaction_scheduler.go index ba6277e58..5abb6bd54 100644 --- a/src/github.com/matrix-org/dendrite/appservice/workers/transaction_scheduler.go +++ b/src/github.com/matrix-org/dendrite/appservice/workers/transaction_scheduler.go @@ -17,6 +17,7 @@ package workers import ( "bytes" "context" + "crypto/tls" "encoding/json" "fmt" "math" @@ -67,6 +68,12 @@ func worker(db *storage.Database, ws types.ApplicationServiceWorkerState) { // Grab the HTTP client for sending requests to app services client := &http.Client{ Timeout: transactionTimeout, + // TODO: Verify certificates + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: true, // nolint: gas + }, + }, } // Initial check for any leftover events to send from last time