-
Notifications
You must be signed in to change notification settings - Fork 22
TLS1.3 support and ENCRYPTION_PADDING_NONE is added #392
base: MAS-2.1.00
Are you sure you want to change the base?
TLS1.3 support and ENCRYPTION_PADDING_NONE is added #392
Conversation
…ed as part of the padding property
private static final String[] SUPPORTED_TLS = {SSL_V3_PROTOCOL, SSL_TLS_V1_PROTOCOL, SSL_TLS_V1_1_PROTOCOL, SSL_TLS_V1_2_PROTOCOL}; | ||
private static final String[] SUPPORTED_TLS_Q = {SSL_V3_PROTOCOL, SSL_TLS_V1_PROTOCOL, SSL_TLS_V1_1_PROTOCOL, SSL_TLS_V1_2_PROTOCOL, SSL_TLS_V1_3_PROTOCOL}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SUPPORTED_TLS_Q , I think you are trying to say, its android q onwards, but its difficult to understand still, please use a more meaningful keyword here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I make SUPPORTED_TLS_FROM_ANDROID_Q ?
@@ -68,8 +72,14 @@ public Socket createSocket(InetAddress address, int port, InetAddress localAddre | |||
} | |||
|
|||
private Socket enableTLS(Socket socket) { | |||
if (socket != null && (socket instanceof SSLSocket)) { | |||
((SSLSocket) socket).setEnabledProtocols(SUPPORTED_TLS); | |||
if ((socket instanceof SSLSocket)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the null check removed here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because instanceof covers that null check. It is actually redundant. IDE was showing the same.
Issue: After Gateway 10 CR03, RSA-PSS support has been added in the Gateway but for Android 10 and above, we have missed it in our SDK. We need to enable ENCRYPTION_PADDING_NONE to support the same for Android 10 and above.
Apart from that, Android SDK 29 and above has started supporting TLS 1.3. As our gateway has the support for TLS 1.3, MAS SDK does not have that. So we enhanced it to support the TLS 1.3 protocol.
For the devices which are running below Android SDK 29(means Android 9 or below devices), they don't support TLS 1.3. In that case, we should enable TLS 1.2 and TLS 1.3 both on the gateway.