Просмотр исходного кода

use InsecureSkipVerify for validation

The server will not yet have a valid certificate so we need to disable
certificate validation in the HTTPGetter.
Joe Julian 5 лет назад
Родитель
Сommit
0369151bfa
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      acme/api/handler.go

+ 7 - 1
acme/api/handler.go

@@ -64,8 +64,14 @@ type HandlerOptions struct {
 
 // NewHandler returns a new ACME API handler.
 func NewHandler(ops HandlerOptions) api.RouterHandler {
+	transport := &http.Transport{
+		TLSClientConfig: &tls.Config{
+			InsecureSkipVerify: true,
+		},
+	}
 	client := http.Client{
-		Timeout: 30 * time.Second,
+		Timeout:   30 * time.Second,
+		Transport: transport,
 	}
 	dialer := &net.Dialer{
 		Timeout: 30 * time.Second,