xine-lib 1.2.11
|
#include "xine_tls.h"
#include <stdlib.h>
#include <errno.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/io_helper.h>
#include "xine_tls_plugin.h"
Data Structures | |
struct | xine_tls |
Macros | |
#define | LOG_MODULE "input_tls" |
Functions | |
static tls_plugin_t * | _x_find_tls_plugin (xine_t *xine, tls_plugin_params_t *params) |
static void | _x_free_tls_plugin (xine_t *xine, tls_plugin_t **tls) |
ssize_t | _x_tls_write (xine_tls_t *t, const void *buf, size_t len) |
ssize_t | _x_tls_part_read (xine_tls_t *t, void *buf, size_t min, size_t max) |
ssize_t | _x_tls_read (xine_tls_t *t, void *buf, size_t len) |
ssize_t | _x_tls_read_line (xine_tls_t *t, char *buf, size_t buf_size) |
void | _x_tls_shutdown (xine_tls_t *t) |
void | _x_tls_close (xine_tls_t **pt) |
void | _x_tls_deinit (xine_tls_t **pt) |
xine_tls_t * | _x_tls_init (xine_t *xine, xine_stream_t *stream, int fd) |
xine_tls_t * | _x_tls_connect (xine_t *xine, xine_stream_t *stream, const char *host, int port) |
int | _x_tls_handshake (xine_tls_t *t, const char *host, int verify) |
int | _x_tls_get_verify_tls_cert (config_values_t *config) |
int | _x_tls_available (xine_t *xine) |
#define LOG_MODULE "input_tls" |
|
inlinestatic |
References _x_find_module(), and NULL.
Referenced by _x_tls_available(), and _x_tls_handshake().
|
inlinestatic |
References _x_free_module().
Referenced by _x_tls_available(), _x_tls_close(), and _x_tls_deinit().
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().
void _x_tls_close | ( | xine_tls_t ** | pt | ) |
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().
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().
void _x_tls_deinit | ( | xine_tls_t ** | pt | ) |
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(), and http_restart().
int _x_tls_get_verify_tls_cert | ( | config_values_t * | config | ) |
References tls_get_verify_tls_cert().
Referenced by _ftp_connect().
int _x_tls_handshake | ( | xine_tls_t * | t, |
const char * | host, | ||
int | verify | ||
) |
Initialize TLS
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. |
References _x_find_tls_plugin(), xine_tls::enabled, xine_tls::fd, tls_plugin_s::handshake, LOG_MODULE, xine_tls::stream, xine_tls::tls, xine_tls::xine, tls_plugin_params_t::xine, XINE_VERBOSITY_LOG, and xprintf.
Referenced by _auth_tls(), http_plugin_handshake(), and net_plugin_open().
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().
ssize_t _x_tls_part_read | ( | xine_tls_t * | t, |
void * | buf, | ||
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().
ssize_t _x_tls_read | ( | xine_tls_t * | t, |
void * | buf, | ||
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().
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().
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().
ssize_t _x_tls_write | ( | xine_tls_t * | t, |
const void * | buf, | ||
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().