tls_connection_handshake() function
tls_connection_handshake - Process TLS handshake (client side) @tls_ctx: TLS context data from tls_init() @conn: Connection context data from tls_connection_init() @in_data: Input data from TLS server @appl_data: Pointer to application data pointer, or %NULL if dropped Returns: Output data, %NULL on failure The caller is responsible for freeing the returned output data. If the final handshake message includes application data, this is decrypted and appl_data (if not %NULL) is set to point this data. The caller is responsible for freeing appl_data. This function is used during TLS handshake. The first call is done with in_data == %NULL and the library is expected to return ClientHello packet. This packet is then send to the server and a response from server is given to TLS library by calling this function again with in_data pointing to the TLS message from the server. If the TLS handshake fails, this function may return %NULL. However, if the TLS library has a TLS alert to send out, that should be returned as the output data. In this case, tls_connection_get_failed() must return failure (> 0). tls_connection_established() should return 1 once the TLS handshake has been completed successfully.
tls_connection_handshake() is called by 1 function and calls 8 functions:
![]()
tls_connection_handshake()
tls_connection_handshake() reads 3 variables and writes 2 variables:
![]()
tls_connection_handshake()