I am experiencing a long delay while calling sslStream.AuthenticateAsClient (about 10 - 11 seconds). I've read this article: https://learn.microsoft.com/de-de/archive/blogs/alejacma/big-delay-when-calling-sslstream-authenticateasclient but I think this shouldn't apply if I am accepting all certificates (lab environment), right?
Is there any other possibility why this is so time consuming? If I look into Wireshark traces, the 11 seconds delay is between "New Session Ticket" and the first "Application Data" message.
' Change zu SSL/TLS
sslStream = New SslStream(stream, False, AddressOf AcceptAllCertificates)
sslStream.AuthenticateAsClient("192.168.1.10")
...
Private Function AcceptAllCertificates(sender As Object, certificate As X509Certificate, chain As X509Chain, sslPolicyErrors As SslPolicyErrors) As Boolean
' Disable certificate revocation list (CRL) checking
chain.ChainPolicy.RevocationMode = X509RevocationMode.NoCheck
' This method accepts all certificates, including those with errors
Return True
End Function