Solution for HTTPS SSL HANDSHAKE Android Older versions

Hi,

I want post the solution in the original posted message but i cant(i dont know if is related a permission in my profile), if someone can advice or copy this solution I will be grateful.

Original Post:

SSL23_GET_SERVER_HELLO error on Android 4.4.x

Problem: in older device (I tested with android 6.0.1, ando 4.4) when i send a remote request task for example a remote sprite and the server have cert(https), android not complete the task and in the log fount this problem:

Caused by: javax.net.ssl.SSLProtocolException: SSL handshake terminated: ssl=0x9869f3c0: Failure in SSL library, usually a protocol error
12-07 08:51:28.046 10002-10090/com.interactiveuy.divino W/System.err: error:100c5410:SSL routines:ssl3_read_bytes:SSLV3_ALERT_HANDSHAKE_FAILURE (external/boringssl/src/ssl/s3_pkt.c:972 0x9f9c4a00:0x00000001)
12-07 08:51:28.046 10002-10090/com.interactiveuy.divino W/System.err: error:100c009f:SSL routines:ssl3_get_server_hello:HANDSHAKE_FAILURE_ON_CLIENT_HELLO (external/boringssl/src/ssl/s3_clnt.c:750 0xab22459f:0x00000000)
12-07 08:51:28.046 10002-10090/com.interactiveuy.divino W/System.err:     at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
12-07 08:51:28.046 10002-10090/com.interactiveuy.divino W/System.err:     at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:324)

I try many solutions i was founding in the web, creating my self ssl factory for example… but nothing work for me.

Solution: I update the libray used by android httpclient-4.4.1.1.jar for last httpclient-4.5.8.jar
You can download jar in this link:

httpclient-4.5.8.jar

replace path:
/YOUR_COCOS2D_PROYPATH/cocos2d/cocos/platform/android/java/libs

Rebuild and cross your fingers

I broken my head some days, and i want a share my treasure workaround.
GOOOD LINES OF CODES!!!
BYE

1 Like