Closed
Description
The block below will throw a PNSE because SNIHostName and SSLEngine.setServerNames are only supported on API level 24 and above.
Here is a sample that can throw the PNSE:
using var client = new TcpClient("login.sequrix.com", 443);
using var stream = new SslStream(client.GetStream(), false);
stream.AuthenticateAsClient(new SslClientAuthenticationOptions()
{
TargetHost = "login.sequrix.com"
});
stream.Read(new byte[100], 0, 100);
We should investigate if there are any alternative approaches.