#include "avformat.h"
#include "url.h"
#include "libavutil/avstring.h"
#include <gnutls/gnutls.h>
#include "network.h"
#include "os_support.h"
#include "internal.h"
#include <poll.h>
Go to the source code of this file.
Data Structures | |
struct | TLSContext |
Defines | |
#define | TLS_read(c, buf, size) gnutls_record_recv(c->session, buf, size) |
#define | TLS_write(c, buf, size) gnutls_record_send(c->session, buf, size) |
#define | TLS_shutdown(c) gnutls_bye(c->session, GNUTLS_SHUT_RDWR) |
#define | TLS_free(c) |
Functions | |
static int | do_tls_poll (URLContext *h, int ret) |
static int | tls_open (URLContext *h, const char *uri, int flags) |
static int | tls_read (URLContext *h, uint8_t *buf, int size) |
static int | tls_write (URLContext *h, const uint8_t *buf, int size) |
static int | tls_close (URLContext *h) |
Variables | |
URLProtocol | ff_tls_protocol |
#define TLS_free | ( | c | ) |
do { \ if (c->session) \ gnutls_deinit(c->session); \ if (c->cred) \ gnutls_certificate_free_credentials(c->cred); \ } while (0)
Definition at line 30 of file tls.c.
Referenced by tls_close(), and tls_open().
Definition at line 27 of file tls.c.
Referenced by tls_read().
#define TLS_shutdown | ( | c | ) | gnutls_bye(c->session, GNUTLS_SHUT_RDWR) |
Definition at line 29 of file tls.c.
Referenced by tls_close().
Definition at line 28 of file tls.c.
Referenced by tls_write().
static int do_tls_poll | ( | URLContext * | h, | |
int | ret | |||
) | [static] |
Definition at line 70 of file tls.c.
Referenced by tls_open(), tls_read(), and tls_write().
static int tls_close | ( | URLContext * | h | ) | [static] |
static int tls_open | ( | URLContext * | h, | |
const char * | uri, | |||
int | flags | |||
) | [static] |
static int tls_read | ( | URLContext * | h, | |
uint8_t * | buf, | |||
int | size | |||
) | [static] |
static int tls_write | ( | URLContext * | h, | |
const uint8_t * | buf, | |||
int | size | |||
) | [static] |
{ .name = "tls", .url_open = tls_open, .url_read = tls_read, .url_write = tls_write, .url_close = tls_close, .priv_data_size = sizeof(TLSContext), .flags = URL_PROTOCOL_FLAG_NETWORK, }