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)
 

Variables

static const AVOption options []
 
static const AVClass tls_class
 
const URLProtocol ff_tls_schannel_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 521 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:47

Definition at line 580 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
static const AVOption options[]
Definition: tls_schannel.c:580
av_default_item_name

Definition at line 585 of file tls_schannel.c.

const URLProtocol ff_tls_schannel_protocol
Initial value:
= {
.name = "tls",
.url_open2 = tls_open,
.url_read = tls_read,
.url_write = tls_write,
.url_close = tls_close,
.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:585
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:521
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 flags
Definition: cpu.c:47

Definition at line 592 of file tls_schannel.c.