Converts an (insecure) TCP connection with a remote server into a secure TLS-over-TCP connection.
It may be called after both of the following:
Functions | |
sint8 | secure (SOCKET sock) |
Converts an (insecure) TCP connection with a remote server into a secure TLS-over-TCP connection. It may be called after both of the following:\n - a TCP socket has been created by the @ref socket function, with u8Config parameter set to @ref SOCKET_CONFIG_SSL_DELAY.\n - a successful connection has been made on the socket via the @ref connect function. This is an asynchronous API; the application socket callback function is notified of the result of the attempt to make the connection secure through the event @ref SOCKET_MSG_SECURE, along with a structure @ref tstrSocketConnectMsg. If the attempt to make the connection secure fails, the application should call @ref close().
[in] | sock | Socket ID, corresponding to a connected TCP socket. |
[in] | sock | Socket ID, corresponding to a connected TCP socket. |
References MAX_SOCKET, NULL, tstrConnectCmd::sock, SOCK_ERR_INVALID, SOCK_ERR_INVALID_ARG, SOCK_ERR_NO_ERROR, SOCKET_CMD_SECURE, SOCKET_REQUEST, SSL_FLAGS_ACTIVE, SSL_FLAGS_DELAY, tstrSocket::u16SessionID, tstrConnectCmd::u16SessionID, tstrSocket::u8SSLFlags, and tstrConnectCmd::u8SslFlags.
Referenced by s25fl1xx_read(), s25fl1xx_read_dual(), and s25fl1xx_read_quad().