Skip to content

Commit 40d8243

Browse files
committed
fix(ota): certificate signed by unknown authority
1 parent 5cea956 commit 40d8243

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ota.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,10 @@ func downloadFile(ctx context.Context, path string, url string, downloadProgress
126126
return fmt.Errorf("error creating request: %w", err)
127127
}
128128

129+
// TODO: set a separate timeout for the download but keep the TLS handshake short
130+
// use Transport here will cause CA certificate validation failure so we temporarily removed it
129131
client := http.Client{
130-
// allow a longer timeout for the download but keep the TLS handshake short
131132
Timeout: 10 * time.Minute,
132-
Transport: &http.Transport{
133-
TLSHandshakeTimeout: 1 * time.Minute,
134-
},
135133
}
136134

137135
resp, err := client.Do(req)

0 commit comments

Comments
 (0)