From 652e845d8317da0371c0efbfccd450118497946b Mon Sep 17 00:00:00 2001 From: Siyuan Miao Date: Wed, 9 Apr 2025 20:25:26 +0200 Subject: [PATCH] fix(ota): certificate signed by unknown authority --- ota.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ota.go b/ota.go index 9c583b6..b28abbb 100644 --- a/ota.go +++ b/ota.go @@ -126,12 +126,10 @@ func downloadFile(ctx context.Context, path string, url string, downloadProgress return fmt.Errorf("error creating request: %w", err) } + // TODO: set a separate timeout for the download but keep the TLS handshake short + // use Transport here will cause CA certificate validation failure so we temporarily removed it client := http.Client{ - // allow a longer timeout for the download but keep the TLS handshake short Timeout: 10 * time.Minute, - Transport: &http.Transport{ - TLSHandshakeTimeout: 1 * time.Minute, - }, } resp, err := client.Do(req)