Answer the question
In order to leave comments, you need to log in
How to encrypt connection for winsock?
I need to send a message from a program. I am creating a socket connection to the yandex.ru server. When I ask the server to start authorization, the server answers me that I need to create a secure connection. How it's done?
Answer the question
In order to leave comments, you need to log in
This is done by communicating over the TLS protocol . From the point of view of OSI, this protocol works on top of the transport layer, i.e. after establishing a TCP connection, you INSTEAD of ordinary unencrypted data send and receive TLS packets. Also, read about STARTTLS , with which you can initiate an encrypted connection over an already open existing one (that is, this is a way of saying that you do not want to reopen a TCP connection, but want to start working over TLS right here).
Of course, you definitely shouldn't try to implement TLS yourself. OpenSSL or PolarSSL will help you . They will prepare both service TLS packets for you and encrypt the payload.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question