mbed TLS v2.2.0
Data Structures | Macros | Functions
ssl_internal.h File Reference
#include "ssl.h"
Include dependency graph for ssl_internal.h:

Go to the source code of this file.

Data Structures

struct  mbedtls_ssl_handshake_params
 
struct  mbedtls_ssl_transform
 

Macros

#define MBEDTLS_SSL_MIN_MAJOR_VERSION   MBEDTLS_SSL_MAJOR_VERSION_3
 
#define MBEDTLS_SSL_MAX_MAJOR_VERSION   MBEDTLS_SSL_MAJOR_VERSION_3
 
#define MBEDTLS_SSL_INITIAL_HANDSHAKE   0
 
#define MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS   1 /* In progress */
 
#define MBEDTLS_SSL_RENEGOTIATION_DONE   2 /* Done or aborted */
 
#define MBEDTLS_SSL_RENEGOTIATION_PENDING   3 /* Requested (server only) */
 
#define MBEDTLS_SSL_RETRANS_PREPARING   0
 
#define MBEDTLS_SSL_RETRANS_SENDING   1
 
#define MBEDTLS_SSL_RETRANS_WAITING   2
 
#define MBEDTLS_SSL_RETRANS_FINISHED   3
 
#define MBEDTLS_SSL_COMPRESSION_ADD   0
 
#define MBEDTLS_SSL_MAC_ADD   16
 
#define MBEDTLS_SSL_PADDING_ADD   0
 
#define MBEDTLS_SSL_BUFFER_LEN
 
#define MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT   (1 << 0)
 
#define MBEDTLS_TLS_EXT_ECJPAKE_KKPP_OK   (1 << 1)
 

Functions

void mbedtls_ssl_transform_free (mbedtls_ssl_transform *transform)
 Free referenced items in an SSL transform context and clear memory. More...
 
void mbedtls_ssl_handshake_free (mbedtls_ssl_handshake_params *handshake)
 Free referenced items in an SSL handshake context and clear memory. More...
 
int mbedtls_ssl_handshake_client_step (mbedtls_ssl_context *ssl)
 
int mbedtls_ssl_handshake_server_step (mbedtls_ssl_context *ssl)
 
void mbedtls_ssl_handshake_wrapup (mbedtls_ssl_context *ssl)
 
int mbedtls_ssl_send_fatal_handshake_failure (mbedtls_ssl_context *ssl)
 
void mbedtls_ssl_reset_checksum (mbedtls_ssl_context *ssl)
 
int mbedtls_ssl_derive_keys (mbedtls_ssl_context *ssl)
 
int mbedtls_ssl_read_record (mbedtls_ssl_context *ssl)
 
int mbedtls_ssl_fetch_input (mbedtls_ssl_context *ssl, size_t nb_want)
 
int mbedtls_ssl_write_record (mbedtls_ssl_context *ssl)
 
int mbedtls_ssl_flush_output (mbedtls_ssl_context *ssl)
 
int mbedtls_ssl_parse_certificate (mbedtls_ssl_context *ssl)
 
int mbedtls_ssl_write_certificate (mbedtls_ssl_context *ssl)
 
int mbedtls_ssl_parse_change_cipher_spec (mbedtls_ssl_context *ssl)
 
int mbedtls_ssl_write_change_cipher_spec (mbedtls_ssl_context *ssl)
 
int mbedtls_ssl_parse_finished (mbedtls_ssl_context *ssl)
 
int mbedtls_ssl_write_finished (mbedtls_ssl_context *ssl)
 
void mbedtls_ssl_optimize_checksum (mbedtls_ssl_context *ssl, const mbedtls_ssl_ciphersuite_t *ciphersuite_info)
 
mbedtls_md_type_t mbedtls_ssl_md_alg_from_hash (unsigned char hash)
 
unsigned char mbedtls_ssl_hash_from_md_alg (int md)
 
void mbedtls_ssl_write_version (int major, int minor, int transport, unsigned char ver[2])
 
void mbedtls_ssl_read_version (int *major, int *minor, int transport, const unsigned char ver[2])
 
static size_t mbedtls_ssl_hdr_len (const mbedtls_ssl_context *ssl)
 
static size_t mbedtls_ssl_hs_hdr_len (const mbedtls_ssl_context *ssl)
 
static int mbedtls_ssl_safer_memcmp (const void *a, const void *b, size_t n)
 

Macro Definition Documentation

#define MBEDTLS_SSL_BUFFER_LEN
Value:
+ 29 /* counter + header + IV */ \
)
#define MBEDTLS_SSL_COMPRESSION_ADD
Definition: ssl_internal.h:118
#define MBEDTLS_SSL_MAC_ADD
Definition: ssl_internal.h:132
#define MBEDTLS_SSL_MAX_CONTENT_LEN
Size of the input / output buffer.
Definition: ssl.h:216
#define MBEDTLS_SSL_PADDING_ADD
Definition: ssl_internal.h:138

Definition at line 141 of file ssl_internal.h.

#define MBEDTLS_SSL_COMPRESSION_ADD   0

Definition at line 118 of file ssl_internal.h.

#define MBEDTLS_SSL_INITIAL_HANDSHAKE   0

Definition at line 91 of file ssl_internal.h.

#define MBEDTLS_SSL_MAC_ADD   16

Definition at line 132 of file ssl_internal.h.

#define MBEDTLS_SSL_MAX_MAJOR_VERSION   MBEDTLS_SSL_MAJOR_VERSION_3

Definition at line 73 of file ssl_internal.h.

#define MBEDTLS_SSL_MIN_MAJOR_VERSION   MBEDTLS_SSL_MAJOR_VERSION_3

Definition at line 54 of file ssl_internal.h.

#define MBEDTLS_SSL_PADDING_ADD   0

Definition at line 138 of file ssl_internal.h.

#define MBEDTLS_SSL_RENEGOTIATION_DONE   2 /* Done or aborted */

Definition at line 93 of file ssl_internal.h.

#define MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS   1 /* In progress */

Definition at line 92 of file ssl_internal.h.

#define MBEDTLS_SSL_RENEGOTIATION_PENDING   3 /* Requested (server only) */

Definition at line 94 of file ssl_internal.h.

#define MBEDTLS_SSL_RETRANS_FINISHED   3

Definition at line 107 of file ssl_internal.h.

#define MBEDTLS_SSL_RETRANS_PREPARING   0

Definition at line 104 of file ssl_internal.h.

#define MBEDTLS_SSL_RETRANS_SENDING   1

Definition at line 105 of file ssl_internal.h.

#define MBEDTLS_SSL_RETRANS_WAITING   2

Definition at line 106 of file ssl_internal.h.

#define MBEDTLS_TLS_EXT_ECJPAKE_KKPP_OK   (1 << 1)

Definition at line 154 of file ssl_internal.h.

#define MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT   (1 << 0)

Definition at line 153 of file ssl_internal.h.

Function Documentation

int mbedtls_ssl_derive_keys ( mbedtls_ssl_context ssl)
int mbedtls_ssl_fetch_input ( mbedtls_ssl_context ssl,
size_t  nb_want 
)
int mbedtls_ssl_flush_output ( mbedtls_ssl_context ssl)
int mbedtls_ssl_handshake_client_step ( mbedtls_ssl_context ssl)
void mbedtls_ssl_handshake_free ( mbedtls_ssl_handshake_params handshake)

Free referenced items in an SSL handshake context and clear memory.

Parameters
handshakeSSL handshake context
int mbedtls_ssl_handshake_server_step ( mbedtls_ssl_context ssl)
void mbedtls_ssl_handshake_wrapup ( mbedtls_ssl_context ssl)
unsigned char mbedtls_ssl_hash_from_md_alg ( int  md)
static size_t mbedtls_ssl_hdr_len ( const mbedtls_ssl_context ssl)
inlinestatic
static size_t mbedtls_ssl_hs_hdr_len ( const mbedtls_ssl_context ssl)
inlinestatic
mbedtls_md_type_t mbedtls_ssl_md_alg_from_hash ( unsigned char  hash)
void mbedtls_ssl_optimize_checksum ( mbedtls_ssl_context ssl,
const mbedtls_ssl_ciphersuite_t ciphersuite_info 
)
int mbedtls_ssl_parse_certificate ( mbedtls_ssl_context ssl)
int mbedtls_ssl_parse_change_cipher_spec ( mbedtls_ssl_context ssl)
int mbedtls_ssl_parse_finished ( mbedtls_ssl_context ssl)
int mbedtls_ssl_read_record ( mbedtls_ssl_context ssl)
void mbedtls_ssl_read_version ( int *  major,
int *  minor,
int  transport,
const unsigned char  ver[2] 
)
void mbedtls_ssl_reset_checksum ( mbedtls_ssl_context ssl)
static int mbedtls_ssl_safer_memcmp ( const void *  a,
const void *  b,
size_t  n 
)
inlinestatic

Definition at line 478 of file ssl_internal.h.

int mbedtls_ssl_send_fatal_handshake_failure ( mbedtls_ssl_context ssl)
void mbedtls_ssl_transform_free ( mbedtls_ssl_transform transform)

Free referenced items in an SSL transform context and clear memory.

Parameters
transformSSL transform context
int mbedtls_ssl_write_certificate ( mbedtls_ssl_context ssl)
int mbedtls_ssl_write_change_cipher_spec ( mbedtls_ssl_context ssl)
int mbedtls_ssl_write_finished ( mbedtls_ssl_context ssl)
int mbedtls_ssl_write_record ( mbedtls_ssl_context ssl)
void mbedtls_ssl_write_version ( int  major,
int  minor,
int  transport,
unsigned char  ver[2] 
)