49#ifndef MBEDTLS_SSL_INTERNAL_H
50#define MBEDTLS_SSL_INTERNAL_H
52#if !defined(MBEDTLS_CONFIG_FILE)
55#include MBEDTLS_CONFIG_FILE
61#if defined(MBEDTLS_MD5_C)
65#if defined(MBEDTLS_SHA1_C)
69#if defined(MBEDTLS_SHA256_C)
73#if defined(MBEDTLS_SHA512_C)
77#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
81#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
82 !defined(inline) && !defined(__cplusplus)
83#define inline __inline
87#define MBEDTLS_SSL_MIN_MAJOR_VERSION MBEDTLS_SSL_MAJOR_VERSION_3
89#if defined(MBEDTLS_SSL_PROTO_SSL3)
90#define MBEDTLS_SSL_MIN_MINOR_VERSION MBEDTLS_SSL_MINOR_VERSION_0
92#if defined(MBEDTLS_SSL_PROTO_TLS1)
93#define MBEDTLS_SSL_MIN_MINOR_VERSION MBEDTLS_SSL_MINOR_VERSION_1
95#if defined(MBEDTLS_SSL_PROTO_TLS1_1)
96#define MBEDTLS_SSL_MIN_MINOR_VERSION MBEDTLS_SSL_MINOR_VERSION_2
98#if defined(MBEDTLS_SSL_PROTO_TLS1_2)
99#define MBEDTLS_SSL_MIN_MINOR_VERSION MBEDTLS_SSL_MINOR_VERSION_3
105#define MBEDTLS_SSL_MIN_VALID_MINOR_VERSION MBEDTLS_SSL_MINOR_VERSION_1
106#define MBEDTLS_SSL_MIN_VALID_MAJOR_VERSION MBEDTLS_SSL_MAJOR_VERSION_3
109#define MBEDTLS_SSL_MAX_MAJOR_VERSION MBEDTLS_SSL_MAJOR_VERSION_3
111#if defined(MBEDTLS_SSL_PROTO_TLS1_2)
112#define MBEDTLS_SSL_MAX_MINOR_VERSION MBEDTLS_SSL_MINOR_VERSION_3
114#if defined(MBEDTLS_SSL_PROTO_TLS1_1)
115#define MBEDTLS_SSL_MAX_MINOR_VERSION MBEDTLS_SSL_MINOR_VERSION_2
117#if defined(MBEDTLS_SSL_PROTO_TLS1)
118#define MBEDTLS_SSL_MAX_MINOR_VERSION MBEDTLS_SSL_MINOR_VERSION_1
120#if defined(MBEDTLS_SSL_PROTO_SSL3)
121#define MBEDTLS_SSL_MAX_MINOR_VERSION MBEDTLS_SSL_MINOR_VERSION_0
128#if defined(MBEDTLS_ECP_RESTARTABLE) && \
129 defined(MBEDTLS_SSL_CLI_C) && \
130 defined(MBEDTLS_SSL_PROTO_TLS1_2) && \
131 defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED)
132#define MBEDTLS_SSL__ECP_RESTARTABLE
135#define MBEDTLS_SSL_INITIAL_HANDSHAKE 0
136#define MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS 1
137#define MBEDTLS_SSL_RENEGOTIATION_DONE 2
138#define MBEDTLS_SSL_RENEGOTIATION_PENDING 3
148#define MBEDTLS_SSL_RETRANS_PREPARING 0
149#define MBEDTLS_SSL_RETRANS_SENDING 1
150#define MBEDTLS_SSL_RETRANS_WAITING 2
151#define MBEDTLS_SSL_RETRANS_FINISHED 3
154#if defined(MBEDTLS_CIPHER_MODE_CBC) && \
155 ( defined(MBEDTLS_AES_C) || \
156 defined(MBEDTLS_CAMELLIA_C) || \
157 defined(MBEDTLS_ARIA_C) || \
158 defined(MBEDTLS_DES_C) )
159#define MBEDTLS_SSL_SOME_SUITES_USE_CBC
164#if defined(MBEDTLS_SSL_SOME_SUITES_USE_CBC) && \
165 ( defined(MBEDTLS_SSL_PROTO_TLS1) || \
166 defined(MBEDTLS_SSL_PROTO_TLS1_1) || \
167 defined(MBEDTLS_SSL_PROTO_TLS1_2) )
168#define MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC
177#if defined(MBEDTLS_ZLIB_SUPPORT)
178#define MBEDTLS_SSL_COMPRESSION_ADD 1024
180#define MBEDTLS_SSL_COMPRESSION_ADD 0
183#if defined(MBEDTLS_ARC4_C) || defined(MBEDTLS_CIPHER_MODE_CBC)
185#if defined(MBEDTLS_SHA512_C)
186#define MBEDTLS_SSL_MAC_ADD 48
187#elif defined(MBEDTLS_SHA256_C)
188#define MBEDTLS_SSL_MAC_ADD 32
190#define MBEDTLS_SSL_MAC_ADD 20
194#define MBEDTLS_SSL_MAC_ADD 16
197#if defined(MBEDTLS_CIPHER_MODE_CBC)
198#define MBEDTLS_SSL_PADDING_ADD 256
200#define MBEDTLS_SSL_PADDING_ADD 0
203#define MBEDTLS_SSL_PAYLOAD_OVERHEAD ( MBEDTLS_SSL_COMPRESSION_ADD + \
204 MBEDTLS_MAX_IV_LENGTH + \
205 MBEDTLS_SSL_MAC_ADD + \
206 MBEDTLS_SSL_PADDING_ADD \
209#define MBEDTLS_SSL_IN_PAYLOAD_LEN ( MBEDTLS_SSL_PAYLOAD_OVERHEAD + \
210 ( MBEDTLS_SSL_IN_CONTENT_LEN ) )
212#define MBEDTLS_SSL_OUT_PAYLOAD_LEN ( MBEDTLS_SSL_PAYLOAD_OVERHEAD + \
213 ( MBEDTLS_SSL_OUT_CONTENT_LEN ) )
216#define MBEDTLS_SSL_MAX_BUFFERED_HS 4
222#define MBEDTLS_TLS_EXT_ADV_CONTENT_LEN ( \
223 (MBEDTLS_SSL_IN_CONTENT_LEN > MBEDTLS_SSL_OUT_CONTENT_LEN) \
224 ? ( MBEDTLS_SSL_OUT_CONTENT_LEN ) \
225 : ( MBEDTLS_SSL_IN_CONTENT_LEN ) \
229#define MBEDTLS_SSL_MAX_SIG_HASH_ALG_LIST_LEN 65534
232#define MBEDTLS_SSL_MAX_CURVE_LIST_LEN 65535
238#if MBEDTLS_SSL_MAX_CONTENT_LEN > 16384
239#error "Bad configuration - record content too large."
242#if MBEDTLS_SSL_IN_CONTENT_LEN > MBEDTLS_SSL_MAX_CONTENT_LEN
243#error "Bad configuration - incoming record content should not be larger than MBEDTLS_SSL_MAX_CONTENT_LEN."
246#if MBEDTLS_SSL_OUT_CONTENT_LEN > MBEDTLS_SSL_MAX_CONTENT_LEN
247#error "Bad configuration - outgoing record content should not be larger than MBEDTLS_SSL_MAX_CONTENT_LEN."
250#if MBEDTLS_SSL_IN_PAYLOAD_LEN > MBEDTLS_SSL_MAX_CONTENT_LEN + 2048
251#error "Bad configuration - incoming protected record payload too large."
254#if MBEDTLS_SSL_OUT_PAYLOAD_LEN > MBEDTLS_SSL_MAX_CONTENT_LEN + 2048
255#error "Bad configuration - outgoing protected record payload too large."
263#define MBEDTLS_SSL_HEADER_LEN 13
265#define MBEDTLS_SSL_IN_BUFFER_LEN \
266 ( ( MBEDTLS_SSL_HEADER_LEN ) + ( MBEDTLS_SSL_IN_PAYLOAD_LEN ) )
268#define MBEDTLS_SSL_OUT_BUFFER_LEN \
269 ( ( MBEDTLS_SSL_HEADER_LEN ) + ( MBEDTLS_SSL_OUT_PAYLOAD_LEN ) )
271#ifdef MBEDTLS_ZLIB_SUPPORT
273#define MBEDTLS_SSL_COMPRESS_BUFFER_LEN ( \
274 ( MBEDTLS_SSL_IN_BUFFER_LEN > MBEDTLS_SSL_OUT_BUFFER_LEN ) \
275 ? MBEDTLS_SSL_IN_BUFFER_LEN \
276 : MBEDTLS_SSL_OUT_BUFFER_LEN \
285#define MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT (1 << 0)
286#define MBEDTLS_TLS_EXT_ECJPAKE_KKPP_OK (1 << 1)
315#define MBEDTLS_SSL_CHK_BUF_PTR( cur, end, need ) \
317 if( mbedtls_ssl_chk_buf_ptr( ( cur ), ( end ), ( need ) ) != 0 ) \
319 return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ); \
327#if defined(MBEDTLS_SSL_PROTO_TLS1_2) && \
328 defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED)
354#if defined(MBEDTLS_SSL_PROTO_TLS1_2) && \
355 defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED)
358#if defined(MBEDTLS_DHM_C)
361#if defined(MBEDTLS_ECDH_C)
364#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
366#if defined(MBEDTLS_SSL_CLI_C)
367 unsigned char *ecjpake_cache;
368 size_t ecjpake_cache_len;
371#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \
372 defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
375#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED)
379#if defined(MBEDTLS_X509_CRT_PARSE_C)
381#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION)
388#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
394 ssl_ecrs_ske_start_processing,
395 ssl_ecrs_cke_ecdh_calc_secret,
396 ssl_ecrs_crt_vrfy_sign,
400#if defined(MBEDTLS_SSL_PROTO_DTLS)
401 unsigned int out_msg_seq;
402 unsigned int in_msg_seq;
404 unsigned char *verify_cookie;
406 unsigned char verify_cookie_len;
410 unsigned char retransmit_state;
411 mbedtls_ssl_flight_item *flight;
412 mbedtls_ssl_flight_item *cur_msg;
413 unsigned char *cur_msg_p;
414 unsigned int in_flight_start_seq;
418 unsigned char alt_out_ctr[8];
423 size_t total_bytes_buffered;
432 unsigned is_fragmented : 1;
433 unsigned is_complete : 1;
453#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \
454 defined(MBEDTLS_SSL_PROTO_TLS1_1)
458#if defined(MBEDTLS_SSL_PROTO_TLS1_2)
459#if defined(MBEDTLS_SHA256_C)
462#if defined(MBEDTLS_SHA512_C)
471 const unsigned char *,
size_t,
485#if defined(MBEDTLS_SSL_SESSION_TICKETS)
488#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET)
492#if defined(MBEDTLS_SSL_ASYNC_PRIVATE)
493 unsigned int async_in_progress : 1;
496#if defined(MBEDTLS_SSL_ASYNC_PRIVATE)
502 void *user_async_ctx;
528#if defined(MBEDTLS_SSL_PROTO_SSL3)
530 unsigned char mac_enc[20];
531 unsigned char mac_dec[20];
543#if defined(MBEDTLS_ZLIB_SUPPORT)
549#if defined(MBEDTLS_X509_CRT_PARSE_C)
561#if defined(MBEDTLS_SSL_PROTO_DTLS)
565struct mbedtls_ssl_flight_item
570 mbedtls_ssl_flight_item *
next;
574#if defined(MBEDTLS_SSL_PROTO_TLS1_2) && \
575 defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED)
703 unsigned update_hs_digest );
722#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED)
726#if defined(MBEDTLS_PK_C)
736#if defined(MBEDTLS_ECP_C)
740#if defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED)
745#if defined(MBEDTLS_X509_CRT_PARSE_C)
786 unsigned char ver[2] );
788 const unsigned char ver[2] );
792#if defined(MBEDTLS_SSL_PROTO_DTLS)
803#if defined(MBEDTLS_SSL_PROTO_DTLS)
812#if defined(MBEDTLS_SSL_PROTO_DTLS)
820#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY)
829 volatile const unsigned char *
A = (
volatile const unsigned char *)
a;
830 volatile const unsigned char *
B = (
volatile const unsigned char *)
b;
831 volatile unsigned char diff = 0;
833 for(
i = 0;
i <
n;
i++ )
838 unsigned char x =
A[
i],
y =
B[
i];
845#if defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \
846 defined(MBEDTLS_SSL_PROTO_TLS1_1)
848 unsigned char *output,
849 unsigned char *
data,
size_t data_len );
853#if defined(MBEDTLS_SSL_PROTO_TLS1) || defined(MBEDTLS_SSL_PROTO_TLS1_1) || \
854 defined(MBEDTLS_SSL_PROTO_TLS1_2)
856 unsigned char *
hash,
size_t *hashlen,
857 unsigned char *
data,
size_t data_len,
862#if defined(MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC)
899 const unsigned char *
add_data,
size_t add_data_len,
900 const unsigned char *
data,
size_t data_len_secret,
901 size_t min_data_len,
size_t max_data_len,
902 unsigned char *output );
923 const unsigned char *src_base,
924 size_t offset_secret,
925 size_t offset_min,
size_t offset_max,
unsigned short int uint16_t
This file contains an abstraction interface for use with the cipher primitives provided by the librar...
static int add_data(struct Vector *v, const BYTE *pData, int size)
static BOOL is_valid(HIMAGELIST himl)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint GLenum GLenum transform
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
mbedtls_md_type_t
Supported message digests.
static UINT PSTR DWORD UINT * need
mbedtls_pk_type_t
Public key types.
static unsigned __int64 next
This file contains SHA-224 and SHA-256 definitions and functions.
This file contains SHA-384 and SHA-512 definitions and functions.
#define MBEDTLS_SSL_TRANSPORT_DATAGRAM
#define MBEDTLS_PREMASTER_SIZE
mbedtls_key_exchange_type_t
static int mbedtls_ssl_safer_memcmp(const void *a, const void *b, size_t n)
void mbedtls_ssl_sig_hash_set_const_hash(mbedtls_ssl_sig_hash_set_t *set, mbedtls_md_type_t md_alg)
mbedtls_pk_type_t mbedtls_ssl_pk_alg_from_sig(unsigned char sig)
int mbedtls_ssl_parse_finished(mbedtls_ssl_context *ssl)
int mbedtls_ssl_write_change_cipher_spec(mbedtls_ssl_context *ssl)
void mbedtls_ssl_cf_memcpy_offset(unsigned char *dst, const unsigned char *src_base, size_t offset_secret, size_t offset_min, size_t offset_max, size_t len)
Copy data from a secret position with constant flow.
#define MBEDTLS_SSL_MAX_BUFFERED_HS
void mbedtls_ssl_handshake_free(mbedtls_ssl_context *ssl)
Free referenced items in an SSL handshake context and clear memory.
int mbedtls_ssl_fetch_input(mbedtls_ssl_context *ssl, size_t nb_want)
void mbedtls_ssl_transform_free(mbedtls_ssl_transform *transform)
Free referenced items in an SSL transform context and clear memory.
static mbedtls_pk_context * mbedtls_ssl_own_key(mbedtls_ssl_context *ssl)
unsigned char mbedtls_ssl_sig_from_pk_alg(mbedtls_pk_type_t type)
int mbedtls_ssl_prepare_handshake_record(mbedtls_ssl_context *ssl)
mbedtls_md_type_t mbedtls_ssl_md_alg_from_hash(unsigned char hash)
mbedtls_md_type_t mbedtls_ssl_sig_hash_set_find(mbedtls_ssl_sig_hash_set_t *set, mbedtls_pk_type_t sig_alg)
int mbedtls_ssl_write_finished(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_derive_keys(mbedtls_ssl_context *ssl)
void mbedtls_ssl_write_version(int major, int minor, int transport, unsigned char ver[2])
int mbedtls_ssl_write_record(mbedtls_ssl_context *ssl, uint8_t force_flush)
int mbedtls_ssl_check_cert_usage(const mbedtls_x509_crt *cert, const mbedtls_ssl_ciphersuite_t *ciphersuite, int cert_endpoint, uint32_t *flags)
void mbedtls_ssl_read_version(int *major, int *minor, int transport, const unsigned char ver[2])
static void mbedtls_ssl_sig_hash_set_init(mbedtls_ssl_sig_hash_set_t *set)
int mbedtls_ssl_check_sig_hash(const mbedtls_ssl_context *ssl, mbedtls_md_type_t md)
int mbedtls_ssl_parse_certificate(mbedtls_ssl_context *ssl)
int mbedtls_ssl_handshake_client_step(mbedtls_ssl_context *ssl)
int mbedtls_ssl_write_handshake_msg(mbedtls_ssl_context *ssl)
void mbedtls_ssl_optimize_checksum(mbedtls_ssl_context *ssl, const mbedtls_ssl_ciphersuite_t *ciphersuite_info)
static size_t mbedtls_ssl_hs_hdr_len(const mbedtls_ssl_context *ssl)
int mbedtls_ssl_parse_change_cipher_spec(mbedtls_ssl_context *ssl)
void mbedtls_ssl_sig_hash_set_add(mbedtls_ssl_sig_hash_set_t *set, mbedtls_pk_type_t sig_alg, mbedtls_md_type_t md_alg)
static mbedtls_x509_crt * mbedtls_ssl_own_cert(mbedtls_ssl_context *ssl)
int mbedtls_ssl_handle_message_type(mbedtls_ssl_context *ssl)
unsigned char mbedtls_ssl_hash_from_md_alg(int md)
int mbedtls_ssl_send_fatal_handshake_failure(mbedtls_ssl_context *ssl)
int mbedtls_ssl_set_calc_verify_md(mbedtls_ssl_context *ssl, int md)
int mbedtls_ssl_read_record(mbedtls_ssl_context *ssl, unsigned update_hs_digest)
Update record layer.
int mbedtls_ssl_cf_hmac(mbedtls_md_context_t *ctx, const unsigned char *add_data, size_t add_data_len, const unsigned char *data, size_t data_len_secret, size_t min_data_len, size_t max_data_len, unsigned char *output)
Compute the HMAC of variable-length data with constant flow.
int mbedtls_ssl_get_key_exchange_md_tls1_2(mbedtls_ssl_context *ssl, unsigned char *hash, size_t *hashlen, unsigned char *data, size_t data_len, mbedtls_md_type_t md_alg)
int mbedtls_ssl_get_key_exchange_md_ssl_tls(mbedtls_ssl_context *ssl, unsigned char *output, unsigned char *data, size_t data_len)
void mbedtls_ssl_reset_checksum(mbedtls_ssl_context *ssl)
int mbedtls_ssl_write_certificate(mbedtls_ssl_context *ssl)
void mbedtls_ssl_update_handshake_status(mbedtls_ssl_context *ssl)
int mbedtls_ssl_flush_output(mbedtls_ssl_context *ssl)
static int mbedtls_ssl_chk_buf_ptr(const uint8_t *cur, const uint8_t *end, size_t need)
This function checks if the remaining size in a buffer is greater or equal than a needed space.
int mbedtls_ssl_check_curve(const mbedtls_ssl_context *ssl, mbedtls_ecp_group_id grp_id)
unsigned char mbedtls_ssl_sig_from_pk(mbedtls_pk_context *pk)
struct mbedtls_ssl_hs_buffer mbedtls_ssl_hs_buffer
static size_t mbedtls_ssl_hdr_len(const mbedtls_ssl_context *ssl)
The DHM context structure.
The ECDH context structure.
The SHA-1 context structure.
The SHA-256 context structure.
The SHA-512 context structure.
This structure is used for storing ciphersuite information.
mbedtls_ssl_key_cert * key_cert
mbedtls_ssl_handshake_params * handshake
const mbedtls_ssl_config * conf
void(* update_checksum)(mbedtls_ssl_context *, const unsigned char *, size_t)
mbedtls_ssl_key_cert * key_cert
mbedtls_sha256_context fin_sha256
unsigned char premaster[MBEDTLS_PREMASTER_SIZE]
mbedtls_x509_crt * sni_ca_chain
const mbedtls_ecp_curve_info ** curves
void(* calc_finished)(mbedtls_ssl_context *, unsigned char *, int)
unsigned char randbytes[64]
int(* tls_prf)(const unsigned char *, size_t, const char *, const unsigned char *, size_t, unsigned char *, size_t)
mbedtls_ssl_sig_hash_set_t hash_algs
mbedtls_sha512_context fin_sha512
mbedtls_dhm_context dhm_ctx
mbedtls_ssl_key_cert * sni_key_cert
mbedtls_ecdh_context ecdh_ctx
mbedtls_sha1_context fin_sha1
mbedtls_x509_crl * sni_ca_crl
mbedtls_md5_context fin_md5
void(* calc_verify)(mbedtls_ssl_context *, unsigned char *)
mbedtls_ssl_key_cert * next