gnutls_constate.c File Reference

#include "MHD_config.h"
#include <gnutls_int.h>
#include <gnutls_constate.h>
#include <gnutls_errors.h>
#include <gnutls_kx.h>
#include <gnutls_algorithms.h>
#include <gnutls_num.h>
#include <gnutls_datum.h>
#include <gnutls_state.h>

Include dependency graph for gnutls_constate.c:

Go to the source code of this file.

Defines

#define EXPORT_FINAL_KEY_SIZE   16
#define CPY_COMMON

Functions

int MHD__gnutls_set_keys (MHD_gtls_session_t session, int hash_size, int IV_size, int key_size, int export_flag)
int MHD__gnutls_set_read_keys (MHD_gtls_session_t session)
int MHD__gnutls_set_write_keys (MHD_gtls_session_t session)
static void MHD__gnutls_cpy_read_security_parameters (MHD_gtls_security_param_st *dst, MHD_gtls_security_param_st *src)
static void MHD__gnutls_cpy_write_security_parameters (MHD_gtls_security_param_st *dst, MHD_gtls_security_param_st *src)
int MHD_gtls_connection_state_init (MHD_gtls_session_t session)
int MHD_gtls_read_connection_state_init (MHD_gtls_session_t session)
int MHD_gtls_write_connection_state_init (MHD_gtls_session_t session)
int MHD_gtls_set_read_cipher (MHD_gtls_session_t session, enum MHD_GNUTLS_CipherAlgorithm algo)
int MHD_gtls_set_write_cipher (MHD_gtls_session_t session, enum MHD_GNUTLS_CipherAlgorithm algo)
int MHD_gtls_set_read_compression (MHD_gtls_session_t session, enum MHD_GNUTLS_CompressionMethod algo)
int MHD_gtls_set_write_compression (MHD_gtls_session_t session, enum MHD_GNUTLS_CompressionMethod algo)
int MHD_gtls_set_kx (MHD_gtls_session_t session, enum MHD_GNUTLS_KeyExchangeAlgorithm algo)
int MHD_gtls_set_read_mac (MHD_gtls_session_t session, enum MHD_GNUTLS_HashAlgorithm algo)
int MHD_gtls_set_write_mac (MHD_gtls_session_t session, enum MHD_GNUTLS_HashAlgorithm algo)

Variables

static const char keyexp [] = "key expansion"
static const int keyexp_length = sizeof (keyexp) - 1
static const char ivblock [] = "IV block"
static const int ivblock_length = sizeof (ivblock) - 1
static const char cliwrite [] = "client write key"
static const int cliwrite_length = sizeof (cliwrite) - 1
static const char servwrite [] = "server write key"
static const int servwrite_length = sizeof (servwrite) - 1


Define Documentation

#define CPY_COMMON

Value:

dst->entity = src->entity; \
        dst->kx_algorithm = src->kx_algorithm; \
        memcpy( &dst->current_cipher_suite, &src->current_cipher_suite, sizeof(cipher_suite_st)); \
        memcpy( dst->master_secret, src->master_secret, TLS_MASTER_SIZE); \
        memcpy( dst->client_random, src->client_random, TLS_RANDOM_SIZE); \
        memcpy( dst->server_random, src->server_random, TLS_RANDOM_SIZE); \
        memcpy( dst->session_id, src->session_id, TLS_MAX_SESSION_ID_SIZE); \
        dst->session_id_size = src->session_id_size; \
        dst->cert_type = src->cert_type; \
        dst->timestamp = src->timestamp; \
        dst->max_record_recv_size = src->max_record_recv_size; \
        dst->max_record_send_size = src->max_record_send_size; \
        dst->version = src->version; \
        memcpy( &dst->extensions, &src->extensions, sizeof(MHD_gtls_ext_st)); \
        memcpy( &dst->inner_secret, &src->inner_secret, TLS_MASTER_SIZE);

Definition at line 428 of file gnutls_constate.c.

Referenced by MHD__gnutls_cpy_read_security_parameters(), and MHD__gnutls_cpy_write_security_parameters().

#define EXPORT_FINAL_KEY_SIZE   16

Definition at line 51 of file gnutls_constate.c.

Referenced by MHD__gnutls_set_keys().


Function Documentation

static void MHD__gnutls_cpy_read_security_parameters ( MHD_gtls_security_param_st dst,
MHD_gtls_security_param_st src 
) [static]

static void MHD__gnutls_cpy_write_security_parameters ( MHD_gtls_security_param_st dst,
MHD_gtls_security_param_st src 
) [static]

int MHD__gnutls_set_keys ( MHD_gtls_session_t  session,
int  hash_size,
int  IV_size,
int  key_size,
int  export_flag 
)

int MHD__gnutls_set_read_keys ( MHD_gtls_session_t  session  ) 

int MHD__gnutls_set_write_keys ( MHD_gtls_session_t  session  ) 

int MHD_gtls_connection_state_init ( MHD_gtls_session_t  session  ) 

Definition at line 475 of file gnutls_constate.c.

References MHD_gnutls_assert, and MHD_gtls_generate_master().

Referenced by MHD__gnutls_recv_handshake_final(), and MHD__gnutls_send_handshake_final().

Here is the call graph for this function:

Here is the caller graph for this function:

int MHD_gtls_read_connection_state_init ( MHD_gtls_session_t  session  ) 

Definition at line 496 of file gnutls_constate.c.

References MHD_gtls_session_int::cipher_specs, MHD_gtls_cipher_specs_st::client_write_IV, MHD_gtls_cipher_specs_st::client_write_key, MHD_gtls_cipher_specs_st::client_write_mac_secret, MHD_gtls_session_int::connection_state, MHD_gnutls_datum_t::data, MHD_gtls_security_param_st::entity, GNUTLS_CIPHER_FAILED, GNUTLS_CLIENT, GNUTLS_E_INTERNAL_ERROR, GNUTLS_E_MEMORY_ERROR, GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM, GNUTLS_SERVER, MHD_gtls_session_int::internals, MHD__gnutls_cpy_read_security_parameters(), MHD__gnutls_free_datum, MHD__gnutls_handshake_log, MHD__gnutls_set_read_keys(), MHD__gnutls_sset_datum, MHD__gnutls_uint64zero, MHD_gnutls_assert, MHD_gnutls_cipher_deinit(), MHD_GNUTLS_CIPHER_NULL, MHD_gnutls_hash_get_algo_len(), MHD_gnutls_mac_is_ok(), MHD_gtls_cipher_init(), MHD_gtls_cipher_suite_get_cipher_algo(), MHD_gtls_cipher_suite_get_kx_algo(), MHD_gtls_cipher_suite_get_mac_algo(), MHD_gtls_cipher_suite_get_name(), MHD_gtls_compression_is_ok(), MHD_gtls_set_kx(), MHD_gtls_set_read_cipher(), MHD_gtls_set_read_compression(), MHD_gtls_set_read_mac(), MHD_gtls_security_param_st::read_bulk_cipher_algorithm, MHD_gtls_conn_stat_st::read_cipher_state, MHD_gtls_security_param_st::read_compression_algorithm, MHD_gtls_security_param_st::read_mac_algorithm, MHD_gtls_conn_stat_st::read_mac_secret, MHD_gtls_conn_stat_st::read_sequence_number, RESUME_FALSE, MHD_gtls_internals_st::resumed, MHD_gtls_session_int::security_parameters, MHD_gtls_cipher_specs_st::server_write_IV, MHD_gtls_cipher_specs_st::server_write_key, MHD_gtls_cipher_specs_st::server_write_mac_secret, and MHD_gnutls_datum_t::size.

Referenced by MHD__gnutls_recv_handshake_final().

Here is the call graph for this function:

Here is the caller graph for this function:

int MHD_gtls_set_kx ( MHD_gtls_session_t  session,
enum MHD_GNUTLS_KeyExchangeAlgorithm  algo 
)

int MHD_gtls_set_read_cipher ( MHD_gtls_session_t  session,
enum MHD_GNUTLS_CipherAlgorithm  algo 
)

int MHD_gtls_set_read_compression ( MHD_gtls_session_t  session,
enum MHD_GNUTLS_CompressionMethod  algo 
)

Definition at line 888 of file gnutls_constate.c.

References GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM, MHD_gnutls_assert, MHD_gtls_compression_is_ok(), MHD_gtls_security_param_st::read_compression_algorithm, and MHD_gtls_session_int::security_parameters.

Referenced by MHD_gtls_read_connection_state_init().

Here is the call graph for this function:

Here is the caller graph for this function:

int MHD_gtls_set_read_mac ( MHD_gtls_session_t  session,
enum MHD_GNUTLS_HashAlgorithm  algo 
)

int MHD_gtls_set_write_cipher ( MHD_gtls_session_t  session,
enum MHD_GNUTLS_CipherAlgorithm  algo 
)

int MHD_gtls_set_write_compression ( MHD_gtls_session_t  session,
enum MHD_GNUTLS_CompressionMethod  algo 
)

Definition at line 906 of file gnutls_constate.c.

References GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM, MHD_gnutls_assert, MHD_gtls_compression_is_ok(), MHD_gtls_session_int::security_parameters, and MHD_gtls_security_param_st::write_compression_algorithm.

Referenced by MHD_gtls_write_connection_state_init().

Here is the call graph for this function:

Here is the caller graph for this function:

int MHD_gtls_set_write_mac ( MHD_gtls_session_t  session,
enum MHD_GNUTLS_HashAlgorithm  algo 
)

int MHD_gtls_write_connection_state_init ( MHD_gtls_session_t  session  ) 

Definition at line 664 of file gnutls_constate.c.

References MHD_gtls_session_int::cipher_specs, MHD_gtls_cipher_specs_st::client_write_IV, MHD_gtls_cipher_specs_st::client_write_key, MHD_gtls_cipher_specs_st::client_write_mac_secret, MHD_gtls_session_int::connection_state, MHD_gnutls_datum_t::data, MHD_gtls_security_param_st::entity, GNUTLS_CIPHER_FAILED, GNUTLS_CLIENT, GNUTLS_E_INTERNAL_ERROR, GNUTLS_E_MEMORY_ERROR, GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM, GNUTLS_SERVER, MHD_gtls_session_int::internals, MHD__gnutls_cpy_write_security_parameters(), MHD__gnutls_free_datum, MHD__gnutls_handshake_log, MHD__gnutls_set_write_keys(), MHD__gnutls_sset_datum, MHD__gnutls_uint64zero, MHD_gnutls_assert, MHD_gnutls_cipher_deinit(), MHD_GNUTLS_CIPHER_NULL, MHD_gnutls_hash_get_algo_len(), MHD_gnutls_mac_is_ok(), MHD_gtls_cipher_init(), MHD_gtls_cipher_suite_get_cipher_algo(), MHD_gtls_cipher_suite_get_kx_algo(), MHD_gtls_cipher_suite_get_mac_algo(), MHD_gtls_cipher_suite_get_name(), MHD_gtls_compression_is_ok(), MHD_gtls_set_kx(), MHD_gtls_set_write_cipher(), MHD_gtls_set_write_compression(), MHD_gtls_set_write_mac(), RESUME_FALSE, MHD_gtls_internals_st::resumed, MHD_gtls_internals_st::resumed_security_parameters, MHD_gtls_session_int::security_parameters, MHD_gtls_cipher_specs_st::server_write_IV, MHD_gtls_cipher_specs_st::server_write_key, MHD_gtls_cipher_specs_st::server_write_mac_secret, MHD_gnutls_datum_t::size, MHD_gtls_security_param_st::write_bulk_cipher_algorithm, MHD_gtls_conn_stat_st::write_cipher_state, MHD_gtls_security_param_st::write_compression_algorithm, MHD_gtls_security_param_st::write_mac_algorithm, MHD_gtls_conn_stat_st::write_mac_secret, and MHD_gtls_conn_stat_st::write_sequence_number.

Referenced by MHD__gnutls_send_handshake_final().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const char cliwrite[] = "client write key" [static]

Definition at line 45 of file gnutls_constate.c.

Referenced by MHD__gnutls_set_keys().

const int cliwrite_length = sizeof (cliwrite) - 1 [static]

Definition at line 46 of file gnutls_constate.c.

Referenced by MHD__gnutls_set_keys().

const char ivblock[] = "IV block" [static]

Definition at line 42 of file gnutls_constate.c.

Referenced by MHD__gnutls_set_keys().

const int ivblock_length = sizeof (ivblock) - 1 [static]

Definition at line 43 of file gnutls_constate.c.

Referenced by MHD__gnutls_set_keys().

const char keyexp[] = "key expansion" [static]

Definition at line 39 of file gnutls_constate.c.

Referenced by MHD__gnutls_set_keys().

const int keyexp_length = sizeof (keyexp) - 1 [static]

Definition at line 40 of file gnutls_constate.c.

Referenced by MHD__gnutls_set_keys().

const char servwrite[] = "server write key" [static]

Definition at line 48 of file gnutls_constate.c.

Referenced by MHD__gnutls_set_keys().

const int servwrite_length = sizeof (servwrite) - 1 [static]

Definition at line 49 of file gnutls_constate.c.

Referenced by MHD__gnutls_set_keys().


Generated on Fri Feb 27 18:31:55 2009 for GNU libmicrohttpd by  doxygen 1.5.7.1