NAMESSL_do_handshake — perform a TLS/SSL handshake
DESCRIPTIONSSL_do_handshake() will wait for a SSL/TLS handshake to take place. If the connection is in client mode, the handshake will be started. The handshake routines may have to be explicitly set in advance using either SSL_set_connect_state(3) or SSL_set_accept_state(3).
NOTESThe behaviour of SSL_do_handshake() depends on the underlying BIO.
RETURN VALUESThe following return values can occur:
- The TLS/SSL handshake was not successful but was shut down controlled and by the specifications of the TLS/SSL protocol. Call SSL_get_error(3) with the return value ret to find out the reason.
- The TLS/SSL handshake was successfully completed, and a TLS/SSL connection has been established.
- The TLS/SSL handshake was not successful because either a fatal error occurred at the protocol level or a connection failure occurred. The shutdown was not clean. It can also occur if action is needed to continue the operation for non-blocking BIOs. Call SSL_get_error(3) with the return value ret to find out the reason.