FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
tls_schannel.c File Reference
#include "avformat.h"
#include "internal.h"
#include "network.h"
#include "os_support.h"
#include "url.h"
#include "tls.h"
#include <windows.h>
#include <security.h>
#include <schnlsp.h>

Go to the source code of this file.

Data Structures

struct  TLSContext
 

Macros

#define SECURITY_WIN32
 Based on the CURL SChannel module. More...
 
#define SCHANNEL_INITIAL_BUFFER_SIZE   4096
 
#define SCHANNEL_FREE_BUFFER_SIZE   1024
 
#define SECBUFFER_ALERT   17
 

Functions

static void init_sec_buffer (SecBuffer *buffer, unsigned long type, void *data, unsigned long size)
 
static void init_sec_buffer_desc (SecBufferDesc *desc, SecBuffer *buffers, unsigned long buffer_count)
 
static int tls_shutdown_client (URLContext *h)
 
static int tls_close (URLContext *h)
 
static int tls_client_handshake_loop (URLContext *h, int initial)
 
static int tls_client_handshake (URLContext *h)
 
static int tls_open (URLContext *h, const char *uri, int flags, AVDictionary **options)
 
static int tls_read (URLContext *h, uint8_t *buf, int len)
 
static int tls_write (URLContext *h, const uint8_t *buf, int len)
 
static int tls_get_file_handle (URLContext *h)
 

Variables

static const AVOption options []
 
static const AVClass tls_class
 
const URLProtocol ff_tls_protocol
 

Macro Definition Documentation

#define SECURITY_WIN32

Based on the CURL SChannel module.

Definition at line 30 of file tls_schannel.c.

#define SCHANNEL_INITIAL_BUFFER_SIZE   4096

Definition at line 35 of file tls_schannel.c.

Referenced by tls_client_handshake_loop().

#define SCHANNEL_FREE_BUFFER_SIZE   1024

Definition at line 36 of file tls_schannel.c.

Referenced by tls_client_handshake_loop(), and tls_read().

#define SECBUFFER_ALERT   17

Definition at line 40 of file tls_schannel.c.

Referenced by tls_client_handshake_loop().

Function Documentation

static void init_sec_buffer ( SecBuffer *  buffer,
unsigned long  type,
void data,
unsigned long  size 
)
static
static void init_sec_buffer_desc ( SecBufferDesc *  desc,
SecBuffer *  buffers,
unsigned long  buffer_count 
)
static
static int tls_shutdown_client ( URLContext h)
static

Definition at line 87 of file tls_schannel.c.

Referenced by tls_close().

static int tls_close ( URLContext h)
static

Definition at line 126 of file tls_schannel.c.

Referenced by tls_open().

static int tls_client_handshake_loop ( URLContext h,
int  initial 
)
static

Definition at line 146 of file tls_schannel.c.

Referenced by tls_client_handshake(), and tls_read().

static int tls_client_handshake ( URLContext h)
static

Definition at line 294 of file tls_schannel.c.

Referenced by tls_open().

static int tls_open ( URLContext h,
const char *  uri,
int  flags,
AVDictionary **  options 
)
static

Definition at line 334 of file tls_schannel.c.

static int tls_read ( URLContext h,
uint8_t buf,
int  len 
)
static

Definition at line 385 of file tls_schannel.c.

static int tls_write ( URLContext h,
const uint8_t buf,
int  len 
)
static

Definition at line 523 of file tls_schannel.c.

static int tls_get_file_handle ( URLContext h)
static

Definition at line 582 of file tls_schannel.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define TLS_COMMON_OPTIONS(pstruct, options_field)
Definition: tls.h:45

Definition at line 588 of file tls_schannel.c.

const AVClass tls_class
static
Initial value:
= {
.class_name = "tls",
.item_name = av_default_item_name,
.option = options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
static const AVOption options[]
Definition: tls_schannel.c:588

Definition at line 593 of file tls_schannel.c.

const URLProtocol ff_tls_protocol
Initial value:
= {
.name = "tls",
.url_open2 = tls_open,
.url_read = tls_read,
.url_write = tls_write,
.url_close = tls_close,
.url_get_file_handle = tls_get_file_handle,
.priv_data_size = sizeof(TLSContext),
.priv_data_class = &tls_class,
}
#define URL_PROTOCOL_FLAG_NETWORK
Definition: url.h:34
static const AVClass tls_class
Definition: tls_schannel.c:593
static int tls_read(URLContext *h, uint8_t *buf, int len)
Definition: tls_schannel.c:385
static int tls_write(URLContext *h, const uint8_t *buf, int len)
Definition: tls_schannel.c:523
static int flags
Definition: log.c:55
static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **options)
Definition: tls_schannel.c:334
static int tls_close(URLContext *h)
Definition: tls_schannel.c:126
static int tls_get_file_handle(URLContext *h)
Definition: tls_schannel.c:582

Definition at line 600 of file tls_schannel.c.