javax.net.ssl.SSLHandshakeException when using DownloadManager on KitKat (endless progress)

1

I'm trying to download files using the following code:

DownloadManager downloadManager = (DownloadManager) activity.getSystemService(Context.DOWNLOAD_SERVICE);
DownloadManager.Request dRequest = new DownloadManager.Request(downloadUri);
downloadManager.enqueue(dRequest);

what happens?

Devices > KitKat

Everything works fine, i'm seeing the native notification correctly, progress is being update and the file is being download to the Download/ folder.

Devices <= KitKat

I'm seeing the native notification correctly, system tries to download the file but error happens. notification progress stays forever (infinite progress)

The error i'm seeing in logcat is:

W/DownloadManager: Aborting request for download 55: while trying to execute request: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x752e2028: Failure in SSL library, usually a protocol error
error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version (external/openssl/ssl/s23_clnt.c:741 0x621ebd38:0x00000000) FinalStatus = 495

Some insights:

  • Tried to download sample zip file from device Chrome app and it didn't work also, until Google last update for Chrome.
  • If i'm replacing https to http, it's working, but this is not good solution for me

Thanks very much for the help!

android
ssl
tls1.2
android-4.4-kitkat
sslhandshakeexception
asked on Stack Overflow Oct 7, 2018 by Udi Oshi

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0