/* This function tries to write BufferSize bytes data from the Buffer into the specified TLS connection. */
INTN EFIAPI TlsWrite(IN VOID *Tls, IN VOID *Buffer, IN UINTN BufferSize)
/* This function tries to write BufferSize bytes data from the Buffer into the specified TLS connection. */
INTN EFIAPI TlsWrite(IN VOID *Tls, IN VOID *Buffer, IN UINTN BufferSize)
{
  TLS_CONNECTION  *TlsConn;
  TlsConn = (TLS_CONNECTION *)Tls;
  if ((TlsConn == NULL) || (TlsConn->Ssl == NULL)) {
    return -1;
  }
  return SSL_write (TlsConn->Ssl, Buffer, (UINT32)BufferSize);
}