Search code examples
androidibm-mobilefirsttls1.2

TLS1.2 connection from native Android app to Worklight server using wlclient library


I am using wlclient.jar for making a connection to Worklight server from Android native app but my requirement is to make it TLS1.2 connection only . I dont find any API in wlclient.jar for mentioning TLS1.2 as a security level . IS customizing wlclient.jar is the only option ? if yes what changes I need to do ?


Solution

  • This issue has since become an APAR (support ticket) for MobileFirst Platform Foundation 7.1: PI64093: APPS ON ANDROID VERSIONS 4.4.2 AND EARLIER CANNOT CONNECT TO SERVER USING HTTPS IF ONLY TLS 1.2 IS ENABLED.

    Workaround (from the APAR description):

    In the native Android code of the MobileFirst Platform hybrid application, in the "onCreate()" method in the application's main activity, it is possible to replace the default SSLSocketFactory provided by Android with one that enables TLS 1.2, immediately after the call to "WL.createInstance(this)", in order to accommodate the use of TLS 1.2 with Android versions 4.4.2 and earlier. Specific steps and code to accomplish this are beyond the scope of this APAR.

    There is now an iFix available to download from IBM Fix Central.

    The issue is resolved by programmatically enabling TLS on Android devices with OS <4.2.