Allows to start a TLS profile negotiation in a synchronous way (blocking the caller).
If TLS profile is not supported the function returns the same connection received. To avoid problems you should use vortex_tls_is_enabled first.
The function always return a reference to a connection, even on TLS failures. Assuming this, it is required to call to vortex_connection_is_ok to check status and proceed as requried if the case an error was found. The same can be done using status or status_message parameters (checking state).
Because the function could fail before the TLS handshake can start or during it, the function returns the same connection if the failure was found before TLS started or a different connection reference (with the same data) if the error is found during the tuning. In both cases a valid reference (which is not the same as valid connection) is always returned (even if the connection is not working).