RetroArch
|
#include "mbedtls/config.h"
#include "mbedtls/platform.h"
#include "mbedtls/ssl_cookie.h"
#include "mbedtls/ssl_internal.h"
#include <string.h>
#include "arc4_alt.h"
Macros | |
#define | COOKIE_MD MBEDTLS_MD_SHA224 |
#define | COOKIE_MD_OUTLEN 32 |
#define | COOKIE_HMAC_LEN 28 |
#define | COOKIE_LEN ( 4 + COOKIE_HMAC_LEN ) |
Functions | |
void | mbedtls_ssl_cookie_init (mbedtls_ssl_cookie_ctx *ctx) |
Initialize cookie context. More... | |
void | mbedtls_ssl_cookie_set_timeout (mbedtls_ssl_cookie_ctx *ctx, unsigned long delay) |
Set expiration delay for cookies (Default MBEDTLS_SSL_COOKIE_TIMEOUT) More... | |
void | mbedtls_ssl_cookie_free (mbedtls_ssl_cookie_ctx *ctx) |
Free cookie context. More... | |
int | mbedtls_ssl_cookie_setup (mbedtls_ssl_cookie_ctx *ctx, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng) |
Setup cookie context (generate keys) More... | |
static int | ssl_cookie_hmac (mbedtls_md_context_t *hmac_ctx, const unsigned char time[4], unsigned char **p, unsigned char *end, const unsigned char *cli_id, size_t cli_id_len) |
int | mbedtls_ssl_cookie_write (void *p_ctx, unsigned char **p, unsigned char *end, const unsigned char *cli_id, size_t cli_id_len) |
int | mbedtls_ssl_cookie_check (void *p_ctx, const unsigned char *cookie, size_t cookie_len, const unsigned char *cli_id, size_t cli_id_len) |
#define COOKIE_HMAC_LEN 28 |
#define COOKIE_LEN ( 4 + COOKIE_HMAC_LEN ) |
#define COOKIE_MD MBEDTLS_MD_SHA224 |
#define COOKIE_MD_OUTLEN 32 |
int mbedtls_ssl_cookie_check | ( | void * | p_ctx, |
const unsigned char * | cookie, | ||
size_t | cookie_len, | ||
const unsigned char * | cli_id, | ||
size_t | cli_id_len | ||
) |
void mbedtls_ssl_cookie_free | ( | mbedtls_ssl_cookie_ctx * | ctx | ) |
Free cookie context.
void mbedtls_ssl_cookie_init | ( | mbedtls_ssl_cookie_ctx * | ctx | ) |
Initialize cookie context.
void mbedtls_ssl_cookie_set_timeout | ( | mbedtls_ssl_cookie_ctx * | ctx, |
unsigned long | delay | ||
) |
Set expiration delay for cookies (Default MBEDTLS_SSL_COOKIE_TIMEOUT)
ctx | Cookie contex |
delay | Delay, in seconds if HAVE_TIME, or in number of cookies issued in the meantime. 0 to disable expiration (NOT recommended) |
int mbedtls_ssl_cookie_setup | ( | mbedtls_ssl_cookie_ctx * | ctx, |
int(*)(void *, unsigned char *, size_t) | f_rng, | ||
void * | p_rng | ||
) |
Setup cookie context (generate keys)
int mbedtls_ssl_cookie_write | ( | void * | p_ctx, |
unsigned char ** | p, | ||
unsigned char * | end, | ||
const unsigned char * | cli_id, | ||
size_t | cli_id_len | ||
) |
|
static |