tlsv1_record_send() function
tlsv1_record_send - TLS record layer: Send a message @rl: Pointer to TLS record layer data @content_type: Content type (TLS_CONTENT_TYPE_*) @buf: Buffer for the generated TLS message (needs to have extra space for header, IV (TLS v1.1), and HMAC) @buf_size: Maximum buf size @payload: Payload to be sent @payload_len: Length of the payload @out_len: Buffer for returning the used buf length Returns: 0 on success, -1 on failure This function fills in the TLS record layer header, adds HMAC, and encrypts the data using the current write cipher.