Skip to content

Commit

Permalink
Allow insecure model download - for older versions of Android with ol…
Browse files Browse the repository at this point in the history
…d certs
  • Loading branch information
kercre123 committed Apr 14, 2024
1 parent e36b7a2 commit 398fe0d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chipper/pkg/wirepod/localization/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package localization

import (
"archive/zip"
"crypto/tls"
"fmt"
"io"
"log"
Expand Down Expand Up @@ -112,6 +113,7 @@ func PrintDownloadPercent(done chan int64, path string, total int64) {

func DownloadFile(url string, dest string) {
if strings.Contains(DownloadStatus, "success") || strings.Contains(DownloadStatus, "error") || strings.Contains(DownloadStatus, "not downloading") {
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
logger.Println("Downloading " + url + " to " + dest)
out, _ := os.Create(dest)
defer out.Close()
Expand Down

0 comments on commit 398fe0d

Please sign in to comment.