You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Android] Investigate support for SSLStream below API Level 24 #78715
if (g_SNIHostName==NULL||g_SSLParametersSetServerNames==NULL)
{
// SSL not supported below API Level 24
returnUNSUPPORTED_API_LEVEL;
}
It does appear that the java SSLEngine can be created with a host name and a port. Not sure how much of the interop we would have to shuffle to accommodate.
I digged into it and it seems that we can force APIs 21-23 to do what we want, although it's not very clean. I'll try to open a draft PR so that we can have a discussion if those code changes are acceptable or not.
There are still quite a few devices running APIs 21-23 in the wild, around 6.1%. It would be easier to drop support for them, but it should be possible to keep supporting them with relatively little effort.
Activity
steveisok commentedon Nov 23, 2022
After looking at this again, it does seem returning
UNSUPPORTED_API_LEVELis heavy handed.runtime/src/native/libs/System.Security.Cryptography.Native.Android/pal_sslstream.c
Lines 484 to 488 in 563297d
It does appear that the java
SSLEnginecan be created with a host name and a port. Not sure how much of the interop we would have to shuffle to accommodate.rgroenewoudt commentedon Nov 23, 2022
This also effects SocketsHttpHandler and ClientWebSocket usage with HTTPS.
For example:
simonrozsival commentedon Nov 28, 2022
I digged into it and it seems that we can force APIs 21-23 to do what we want, although it's not very clean. I'll try to open a draft PR so that we can have a discussion if those code changes are acceptable or not.
marek-safar commentedon Nov 28, 2022
API23 is 5+ years out of supported version, do we need to support that in net8?
simonrozsival commentedon Nov 28, 2022
There are still quite a few devices running APIs 21-23 in the wild, around 6.1%. It would be easier to drop support for them, but it should be possible to keep supporting them with relatively little effort.
steveisok commentedon Nov 28, 2022
I'll raise that with the larger team and see if there's a desire to bump the min version. I think this definitely needs to be fixed for .NET 6/7.
karelz commentedon May 27, 2023
Fixed in main (8.0) in PR #78918 and in 7.0.3 in PR #79280 and in 6.0.14 in PR #79277.