[TIMOB-26956] Android: Add TLS 1.3 support
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-10-07T11:35:02.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 8.3.0 |
Components | Android |
Labels | HTTPClient, TLS, android, network |
Reporter | Joshua Quick |
Assignee | Gary Mathews |
Created | 2019-03-30T01:16:16.000+0000 |
Updated | 2019-10-07T11:35:02.000+0000 |
Description
*Summary:*
Android Q adds support for TLS 1.3. We should update Titanium networking code to support this.
https://developer.android.com/preview/features#tls-1.3
We should also make sure TLS 1.3 is enabled by default when doing network communications via:
*
HTTPClient
* Loading images via URLs. (ex: ImageView.image
)
* Module verification on app startup for non-production builds via "ti.verify".
*Requirements:*
* Add a new TLS_VERSION_1_3
constant to [Ti.Network](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Network) module.
* Add support for the new TLS version constant to [HTTPClient.tlsVersion](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Network.HTTPClient-property-tlsVersion) property.
* Update our Java [TiSocketFactory](https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/network/src/java/ti/modules/titanium/network/TiSocketFactory.java) class to support TLS 1.3. _(Used by all of our Android networking code.)_
8_3_X: https://github.com/appcelerator/titanium_mobile/pull/11195
FR Passed. The response text for httpclient request to a TLS test page returns success for TLS1.3 on Android Q emulator. For older Android versions the TLS1.3 support is returned as false. Also when tlsVersion is set to 1.2 for httpclient request then the response text returns false on Android Q emulator as well.
Verified. Compared against API 28 and API 29. Can confirm that HTTPClient now uses TLS 1.3 in this build. Ticked closed.