xine-lib: xine-lib-1.2.13/src/input/tls/xine_tls.h File Reference

xine-lib 1.2.13-20230125hg15249

Typedefs | Functions
xine_tls.h File Reference
`#include <xine/xine_internal.h>`

Go to the source code of this file.

## Typedefs
typedef struct xine_tls | xine_tls_t

## Functions
int | _x_tls_available (xine_t *xine)
xine_tls_t * | _x_tls_connect (xine_t *xine, xine_stream_t *stream, const char *host, int port)
void | _x_tls_close (xine_tls_t **tlsp)
xine_tls_t * | _x_tls_init (xine_t *xine, xine_stream_t *stream, int fd)
void | _x_tls_deinit (xine_tls_t **tlsp)
ssize_t | _x_tls_part_read (xine_tls_t *, void *data, size_t min, size_t max)
ssize_t | _x_tls_read (xine_tls_t *, void *data, size_t len)
ssize_t | _x_tls_write (xine_tls_t *, const void *data, size_t len)
ssize_t | _x_tls_read_line (xine_tls_t *, char *buf, size_t buf_size)
int | _x_tls_handshake (xine_tls_t *, const char *host, int verify)
void | _x_tls_shutdown (xine_tls_t *)
int | _x_tls_get_verify_tls_cert (config_values_t *)

## Typedef Documentation

## ◆ xine_tls_t

typedef struct xine_tls xine_tls_t

## Function Documentation

## ◆ _x_tls_available()

int _x_tls_available | ( | xine_t * | xine | ) |

References _x_find_tls_plugin(), _x_free_tls_plugin(), and tls_plugin_params_t::xine.

Referenced by http_can_handle().

## ◆ _x_tls_close()

void _x_tls_close | ( | xine_tls_t ** | tlsp | ) |

References _x_free_tls_plugin(), _x_freep(), _x_io_tcp_close(), _x_tls_shutdown(), xine_tls::fd, xine_tls::stream, xine_tls::tls, and xine_tls::xine.

Referenced by _ftp_dispose(), and net_plugin_dispose().

## ◆ _x_tls_connect()

xine_tls_t * _x_tls_connect | ( | xine_t * | xine,
|  | xine_stream_t * | stream,
|  | const char * | host,
|  | int | port )

References _x_io_tcp_close(), _x_io_tcp_connect(), xine_tls::fd, NULL, xine_tls::stream, and xine_tls::xine.

Referenced by net_plugin_open().

## ◆ _x_tls_deinit()

void _x_tls_deinit | ( | xine_tls_t ** | tlsp | ) |

References _x_free_tls_plugin(), _x_freep(), _x_tls_shutdown(), xine_tls::fd, xine_tls::tls, and xine_tls::xine.

Referenced by http_close(), http_plugin_handshake(), http_plugin_open(), and http_restart().

## ◆ _x_tls_get_verify_tls_cert()

int _x_tls_get_verify_tls_cert | ( | config_values_t * | config | ) |

References tls_get_verify_tls_cert().

Referenced by _ftp_connect().

## ◆ _x_tls_handshake()

int _x_tls_handshake | ( | xine_tls_t * | t,
|  | const char * | host,
|  | int | verify )

Initialize TLS

Parameters

  host | Host name to check certificate against (may be NULL ex. if numeric address).
  verify | verify certificate. 0 - no, 1 - yes, < 0 - fetch value from xine config.

Returns
  < 0 on error.

References _x_find_tls_plugin(), xine_tls::enabled, xine_tls::fd, tls_plugin_s::handshake, LOG_MODULE, xine_tls::stream, xine_tls::tls, tls_plugin_params_t::xine, xine_tls::xine, XINE_VERBOSITY_LOG, and xprintf.

Referenced by _auth_tls(), http_plugin_handshake(), and net_plugin_open().

## ◆ _x_tls_init()

xine_tls_t * _x_tls_init | ( | xine_t * | xine,
|  | xine_stream_t * | stream,
|  | int | fd )

References xine_tls::fd, NULL, xine_tls::stream, and xine_tls::xine.

Referenced by _ftp_connect(), and http_plugin_handshake().

## ◆ _x_tls_part_read()

ssize_t _x_tls_part_read | ( | xine_tls_t * | t,
|  | void * | data,
|  | size_t | min,
|  | size_t | max )

References _x_io_tcp_part_read(), xine_tls::enabled, xine_tls::fd, tls_plugin_s::part_read, xine_tls::stream, and xine_tls::tls.

Referenced by sbuf_get_string().

## ◆ _x_tls_read()

ssize_t _x_tls_read | ( | xine_tls_t * | t,
|  | void * | data,
|  | size_t | len )

References _x_io_tcp_read(), xine_tls::enabled, xine_tls::fd, tls_plugin_s::read, xine_tls::stream, and xine_tls::tls.

Referenced by _x_tls_read_line(), net_plugin_open(), net_plugin_read(), and sbuf_get_bytes().

## ◆ _x_tls_read_line()

ssize_t _x_tls_read_line | ( | xine_tls_t * | t,
|  | char * | buf,
|  | size_t | buf_size )

References _x_io_tcp_read_line(), _x_tls_read(), xine_tls::enabled, xine_tls::fd, and xine_tls::stream.

Referenced by _read_response().

## ◆ _x_tls_shutdown()

void _x_tls_shutdown | ( | xine_tls_t * | t | ) |

Shutdown TLS (stop encryption).

Underlying socket remains open.

References xine_tls::enabled, tls_plugin_s::shutdown, and xine_tls::tls.

Referenced by _x_tls_close(), and _x_tls_deinit().

## ◆ _x_tls_write()

ssize_t _x_tls_write | ( | xine_tls_t * | t,
|  | const void * | data,
|  | size_t | len )

References _x_io_tcp_write(), xine_tls::enabled, xine_tls::fd, xine_tls::stream, xine_tls::tls, and tls_plugin_s::write.

Referenced by _write_command(), http_plugin_handshake(), and net_plugin_open().