NAMESSL_write — write bytes to a TLS/SSL connection
SSL_write(SSL *ssl, const void *buf, int num);
DESCRIPTIONSSL_write() writes num bytes from the buffer buf into the specified ssl connection.
NOTESIf necessary, SSL_write() will negotiate a TLS/SSL session, if not already explicitly performed by SSL_connect(3) or SSL_accept(3). If the peer requests a re-negotiation, it will be performed transparently during the SSL_write() operation. The behaviour of SSL_write() depends on the underlying BIO.
WARNINGWhen an SSL_write() operation has to be repeated because of SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE, it must be repeated with the same arguments.
RETURN VALUESThe following return values can occur:
- The write operation was successful. The return value is the number of bytes actually written to the TLS/SSL connection.
The write operation was not successful. Probably the underlying connection was closed. Call SSL_get_error(3) with the return value to find out whether an error occurred or the connection was shut down cleanly (SSL_ERROR_ZERO_RETURN).
- The write operation was not successful, because either an error occurred or action must be taken by the calling process. Call SSL_get_error(3) with the return value to find out the reason.