novoda / download-manager

A library that handles long-running downloads, handling the network interactions and retrying downloads automatically after failures
Apache License 2.0
483 stars 63 forks source link

Untrusted Certificate Authority #468

Closed wman1980 closed 5 years ago

wman1980 commented 5 years ago

Hi,

thanks for the new version. I migrated successfully from your old version to the new one. It was some hassle but it seems to work now.

I have one other question. Currently my app makes api-calls, image requests, and download requests against a server where I needed to trust an unknown certificate authority. So I updated my Volley code according to https://developer.android.com/training/articles/security-ssl#java.

Unfortunately of this unknown certificate authority the new download manager can not download the requested files because of: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

Is there any way to fix that by telling your downloader to use a SSLSocketFactory with a TrustManager?

E.g. I fixed the issue for downloading images by telling Picasso to use a custom UrlConnectionDownloader and passing it my SSLSocketFactory.

Btw: whats the default downloader of this lib?

Thanks and regards Jan

wman1980 commented 5 years ago

Sorry, I got one working solution by having a look at you example and using the Builder for the download manager by passing it a custom HttpClient.

Mecharyry commented 5 years ago

That's great to hear @wman1980, do you mind if we close this issue?

wman1980 commented 5 years ago

please close it.