vb.net sslStream "The handshake failed due to an unexpected packet format"

36 views Asked by At

I have the following problem: sslStream.AuthenticateAsClient(serverHostName) throws "System.IO.IOException: The handshake failed due to an unexpected packet format"

There is no more details visible in the output Window. I can see a TLS v1.2 Client Hello, Server Hello and Server Hello Done in Wireshark

How am I able to get more infos, on why the handshake failed?

    Dim client As TcpClient
    Dim stream As NetworkStream

    ServicePointManager.ServerCertificateValidationCallback = AddressOf ValidateServerCertificate 'This function returns true, to accept all certificates.
    client = New TcpClient("192.168.0.123", 30120) 'Custom Server Applikation on Port 30120
    stream = client.GetStream()

    Dim sslStream As New SslStream(stream)
    Dim serverHostName As String = "192.168.0.123"
    sslStream.AuthenticateAsClient(serverHostName)

Thanks!

0

There are 0 answers