|
FFmpeg
|
#include <errno.h>#include <gnutls/gnutls.h>#include <gnutls/dtls.h>#include <gnutls/x509.h>#include "avformat.h"#include "network.h"#include "os_support.h"#include "url.h"#include "tls.h"#include "libavutil/intreadwrite.h"#include "libavutil/opt.h"#include "libavutil/thread.h"#include "libavutil/random_seed.h"Go to the source code of this file.
Data Structures | |
| struct | TLSContext |
Macros | |
| #define | GNUTLS_VERSION_NUMBER LIBGNUTLS_VERSION_NUMBER |
| #define | MAX_MD_SIZE 64 |
Functions | |
| static int | pkey_to_pem_string (gnutls_x509_privkey_t key, char *out, size_t out_sz) |
| static int | crt_to_pem_string (gnutls_x509_crt_t crt, char *out, size_t out_sz) |
| static int | gnutls_x509_fingerprint (gnutls_x509_crt_t cert, char **fingerprint) |
| int | ff_ssl_read_key_cert (char *key_url, char *crt_url, char *key_buf, size_t key_sz, char *crt_buf, size_t crt_sz, char **fingerprint) |
| static int | gnutls_gen_private_key (gnutls_x509_privkey_t *key) |
| static int | gnutls_gen_certificate (gnutls_x509_privkey_t key, gnutls_x509_crt_t *crt, char **fingerprint) |
| int | ff_ssl_gen_key_cert (char *key_buf, size_t key_sz, char *cert_buf, size_t cert_sz, char **fingerprint) |
| void | ff_gnutls_init (void) |
| void | ff_gnutls_deinit (void) |
| int | ff_tls_set_external_socket (URLContext *h, URLContext *sock) |
| int | ff_dtls_export_materials (URLContext *h, char *dtls_srtp_materials, size_t materials_sz) |
| static int | print_tls_error (URLContext *h, int ret) |
| static int | tls_close (URLContext *h) |
| static ssize_t | gnutls_url_pull (gnutls_transport_ptr_t transport, void *buf, size_t len) |
| static ssize_t | gnutls_url_push (gnutls_transport_ptr_t transport, const void *buf, size_t len) |
| static int | gnutls_pull_timeout (gnutls_transport_ptr_t ptr, unsigned int ms) |
| static int | tls_handshake (URLContext *h) |
| static int | tls_open (URLContext *h, const char *uri, int flags, AVDictionary **options) |
| static int | dtls_open (URLContext *h, const char *uri, int flags, AVDictionary **options) |
| 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_get_file_handle (URLContext *h) |
| static int | tls_get_short_seek (URLContext *h) |
Variables | |
| static AVMutex | gnutls_mutex = AV_MUTEX_INITIALIZER |
| static const AVOption | options [] |
| static const AVClass | tls_class |
| const URLProtocol | ff_tls_protocol |
| static const AVClass | dtls_class |
| const URLProtocol | ff_dtls_protocol |
| #define GNUTLS_VERSION_NUMBER LIBGNUTLS_VERSION_NUMBER |
Definition at line 39 of file tls_gnutls.c.
| #define MAX_MD_SIZE 64 |
Definition at line 47 of file tls_gnutls.c.
|
static |
Definition at line 49 of file tls_gnutls.c.
Referenced by ff_ssl_gen_key_cert(), and ff_ssl_read_key_cert().
|
static |
Definition at line 69 of file tls_gnutls.c.
Referenced by ff_ssl_gen_key_cert(), and ff_ssl_read_key_cert().
|
static |
Definition at line 89 of file tls_gnutls.c.
Referenced by ff_ssl_read_key_cert(), and gnutls_gen_certificate().
| int ff_ssl_read_key_cert | ( | char * | key_url, |
| char * | crt_url, | ||
| char * | key_buf, | ||
| size_t | key_sz, | ||
| char * | crt_buf, | ||
| size_t | crt_sz, | ||
| char ** | fingerprint | ||
| ) |
Definition at line 112 of file tls_gnutls.c.
|
static |
Definition at line 189 of file tls_gnutls.c.
Referenced by ff_ssl_gen_key_cert(), and tls_open().
|
static |
See https://gnutls.org/manual/gnutls.html#gnutls_005fx509_005fcrt_005fset_005fserial-1 The provided serial should be a big-endian positive number (i.e. its leftmost bit should be zero).
Definition at line 215 of file tls_gnutls.c.
Referenced by ff_ssl_gen_key_cert(), and tls_open().
| int ff_ssl_gen_key_cert | ( | char * | key_buf, |
| size_t | key_sz, | ||
| char * | cert_buf, | ||
| size_t | cert_sz, | ||
| char ** | fingerprint | ||
| ) |
Definition at line 296 of file tls_gnutls.c.
| void ff_gnutls_init | ( | void | ) |
Definition at line 345 of file tls_gnutls.c.
Referenced by ff_tls_init(), and tls_open().
| void ff_gnutls_deinit | ( | void | ) |
Definition at line 356 of file tls_gnutls.c.
Referenced by ff_tls_deinit(), and tls_close().
| int ff_tls_set_external_socket | ( | URLContext * | h, |
| URLContext * | sock | ||
| ) |
Definition at line 363 of file tls_gnutls.c.
| int ff_dtls_export_materials | ( | URLContext * | h, |
| char * | dtls_srtp_materials, | ||
| size_t | materials_sz | ||
| ) |
Definition at line 376 of file tls_gnutls.c.
|
static |
Definition at line 389 of file tls_gnutls.c.
Referenced by tls_handshake(), tls_read(), and tls_write().
|
static |
Definition at line 416 of file tls_gnutls.c.
Referenced by ff_tls_close(), and tls_open().
|
static |
Definition at line 432 of file tls_gnutls.c.
Referenced by tls_open().
|
static |
Definition at line 464 of file tls_gnutls.c.
Referenced by tls_open().
|
static |
Definition at line 484 of file tls_gnutls.c.
Referenced by tls_open().
|
static |
Definition at line 501 of file tls_gnutls.c.
Referenced by tls_open().
|
static |
Definition at line 527 of file tls_gnutls.c.
Referenced by dtls_open().
|
static |
Definition at line 678 of file tls_gnutls.c.
|
static |
Definition at line 686 of file tls_gnutls.c.
Referenced by ff_tls_read().
|
static |
Definition at line 703 of file tls_gnutls.c.
Referenced by ff_tls_write().
|
static |
Definition at line 720 of file tls_gnutls.c.
|
static |
Definition at line 726 of file tls_gnutls.c.
|
static |
Definition at line 343 of file tls_gnutls.c.
Referenced by ff_gnutls_deinit(), and ff_gnutls_init().
Definition at line 732 of file tls_gnutls.c.
|
static |
Definition at line 737 of file tls_gnutls.c.
| const URLProtocol ff_tls_protocol |
Definition at line 744 of file tls_gnutls.c.
|
static |
Definition at line 757 of file tls_gnutls.c.
| const URLProtocol ff_dtls_protocol |
Definition at line 764 of file tls_gnutls.c.
1.8.17