Connect to secure server using secure(SSL) sockets(plan tcp client)

Hey guys :slight_smile:

I’m trying to connect to remote server(not my server) via socket(no HTTP request) with SSL(no client certificate is needed)

The client should have two threads, one thread that waits for incoming(with blocking) messages, and the second one for sending messages.

Basically I’m trying to simulate .NET C# SslStream and AuthenticateAsClient(String) with absolutely no success.

I don’t understated how to wait for the server to authenticate the client before the client can send data in a secure way.

Can someone please provide some basic code, that connect -> authenticate -> read and write(with blocking)?


1 Like