gnutls_int.h File Reference

#include <defines.h>
#include "gnutls.h"
#include "microhttpd.h"
#include "gnutls_mem.h"
#include <gnutls_mpi.h>
#include <gnutls_str.h>
#include <gnutls_hash_int.h>
#include <gnutls_cipher_int.h>
#include <gnutls_compress_int.h>
#include <gnutls_cert.h>

Include dependency graph for gnutls_int.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  uint24
struct  MHD_gtls_auth_cred_st
struct  MHD_gtls_key
struct  cipher_suite_st
struct  server_name_st
struct  MHD_gtls_ext_st
struct  MHD_gtls_security_param_st
struct  MHD_gtls_cipher_specs_st
struct  MHD_gtls_conn_stat_st
struct  MHD_gtls_priority_st
struct  MHD_gtls_priority_st
struct  MHD_gtls_dh_params_int
struct  MHD_gtls_internal_params_st
struct  MHD_gtls_handshake_header_buffer_st
struct  MHD_gtls_internals_st
struct  MHD_gtls_session_int

Defines

#define KEYRING_HACK
#define MAX(X, Y)   ((X) > (Y) ? (X) : (Y))
#define MAX32   4294967295
#define MAX24   16777215
#define MAX16   65535
#define MAX_HANDSHAKE_PACKET_SIZE   48*1024
#define TLS_RANDOM_SIZE   32
#define TLS_MAX_SESSION_ID_SIZE   32
#define TLS_MASTER_SIZE   48
#define MAX_HASH_SIZE   64
#define MAX_LOG_SIZE   1024
#define MAX_SRP_USERNAME   128
#define MAX_SERVER_NAME_SIZE   128
#define MAX_EXT_TYPES   64
#define INITIAL_RECV_BUFFER_SIZE   256
#define DEFAULT_LOWAT   1
#define DEFAULT_EXPIRE_TIME   3600
#define DEFAULT_MAX_RECORD_SIZE   16384
#define RECORD_HEADER_SIZE   5
#define MAX_RECORD_SEND_SIZE   (size_t)session->security_parameters.max_record_send_size
#define MAX_RECORD_RECV_SIZE   (size_t)session->security_parameters.max_record_recv_size
#define MAX_PAD_SIZE   255
#define EXTRA_COMP_SIZE   2048
#define MAX_RECORD_OVERHEAD   MAX_PAD_SIZE+EXTRA_COMP_SIZE
#define MAX_RECV_SIZE   MAX_RECORD_OVERHEAD+MAX_RECORD_RECV_SIZE+RECORD_HEADER_SIZE
#define HANDSHAKE_HEADER_SIZE   4
#define DEFAULT_VERIFY_DEPTH   32
#define DEFAULT_VERIFY_BITS   16*1024
#define DECR_LEN(len, x)   do { len-=x; if (len<0) {MHD_gnutls_assert(); return GNUTLS_E_UNEXPECTED_PACKET_LENGTH;} } while (0)
#define DECR_LENGTH_RET(len, x, RET)   do { len-=x; if (len<0) {MHD_gnutls_assert(); return RET;} } while (0)
#define DECR_LENGTH_COM(len, x, COM)   do { len-=x; if (len<0) {MHD_gnutls_assert(); COM;} } while (0)
#define HASH2MAC(x)   ((enum MHD_GNUTLS_HashAlgorithm)x)
#define GNUTLS_POINTER_TO_INT_CAST   (long)
#define GNUTLS_POINTER_TO_INT(_)   ((int) GNUTLS_POINTER_TO_INT_CAST (_))
#define GNUTLS_INT_TO_POINTER(_)   ((void*) GNUTLS_POINTER_TO_INT_CAST (_))
#define MHD_gtls_buffer_init(buf)   MHD_gtls_string_init(buf, MHD_gnutls_malloc, MHD_gnutls_realloc, MHD_gnutls_free);
#define MHD_gtls_buffer_clear   MHD_gtls_string_clear
#define MHD_gtls_buffer_append   MHD_gtls_string_append_data
#define MAX_ALGOS   16
#define MAX_CIPHERSUITES   256
#define GNUTLS_PK_ANY   (enum MHD_GNUTLS_PublicKeyAlgorithm)-1
#define GNUTLS_PK_NONE   (enum MHD_GNUTLS_PublicKeyAlgorithm)-2
#define MAX_SERVER_NAME_EXTENSIONS   3
#define MHD__gnutls_get_adv_version_major(session)   session->internals.adv_version_major
#define MHD__gnutls_get_adv_version_minor(session)   session->internals.adv_version_minor
#define set_adv_version(session, major, minor)

Typedefs

typedef unsigned char opaque
typedef MHD_gtls_string MHD_gtls_buffer
typedef void(*) LOG_FUNC (int, const char *)
typedef MHD_gtls_auth_cred_st auth_cred_st
typedef MHD_gtls_keyMHD_gtls_key_st
typedef enum tls_ext_parse_type_t MHD_gtls_ext_parse_type_t
typedef MHD_gtls_dh_params_int MHD_gtls_dh_params_st

Enumerations

enum  change_cipher_spec_t { GNUTLS_TYPE_CHANGE_CIPHER_SPEC = 1 }
enum  handshake_state_t {
  STATE0 = 0, STATE1, STATE2, STATE3,
  STATE4, STATE5, STATE6, STATE7,
  STATE8, STATE9, STATE20 = 20, STATE21,
  STATE30 = 30, STATE31, STATE50 = 50, STATE60 = 60,
  STATE61, STATE62, STATE70, STATE71
}
enum  extensions_t {
  GNUTLS_EXTENSION_SERVER_NAME = 0, GNUTLS_EXTENSION_MAX_RECORD_SIZE = 1, GNUTLS_EXTENSION_CERT_TYPE = 9, GNUTLS_EXTENSION_SRP = 12,
  GNUTLS_EXTENSION_INNER_APPLICATION = 37703
}
enum  cipher_type_t { CIPHER_STREAM, CIPHER_BLOCK }
enum  valid_session_t { VALID_TRUE, VALID_FALSE }
enum  resumable_session_t { RESUME_TRUE, RESUME_FALSE }
enum  content_type_t {
  GNUTLS_CHANGE_CIPHER_SPEC = 20, GNUTLS_ALERT, GNUTLS_HANDSHAKE, GNUTLS_APPLICATION_DATA,
  GNUTLS_INNER_APPLICATION = 24
}
enum  tls_ext_parse_type_t { EXTENSION_ANY, EXTENSION_APPLICATION, EXTENSION_TLS }

Functions

void MHD_gtls_set_current_version (MHD_gtls_session_t session, enum MHD_GNUTLS_Protocol version)
void MHD_gtls_free_auth_info (MHD_gtls_session_t session)
enum MHD_GNUTLS_Protocol MHD_gtls_get_adv_version (MHD_gtls_session_t)


Define Documentation

#define DECR_LEN ( len,
 )     do { len-=x; if (len<0) {MHD_gnutls_assert(); return GNUTLS_E_UNEXPECTED_PACKET_LENGTH;} } while (0)

Definition at line 95 of file gnutls_int.h.

Referenced by MHD__gnutls_parse_supplemental(), MHD__gnutls_proc_rsa_client_kx(), MHD__gnutls_read_client_hello(), MHD_gtls_cert_type_recv_params(), MHD_gtls_max_record_recv_params(), MHD_gtls_proc_cert_cert_req(), MHD_gtls_proc_cert_client_cert_vrfy(), MHD_gtls_proc_dh_common_client_kx(), MHD_gtls_proc_dh_common_server_kx(), MHD_gtls_proc_x509_server_certificate(), MHD_gtls_server_name_recv_params(), proc_dhe_server_kx(), and proc_rsa_export_server_kx().

#define DECR_LENGTH_COM ( len,
x,
COM   )     do { len-=x; if (len<0) {MHD_gnutls_assert(); COM;} } while (0)

Definition at line 97 of file gnutls_int.h.

Referenced by get_issuers_num().

#define DECR_LENGTH_RET ( len,
x,
RET   )     do { len-=x; if (len<0) {MHD_gnutls_assert(); return RET;} } while (0)

Definition at line 96 of file gnutls_int.h.

Referenced by _find_x509_cert(), MHD_gtls_parse_extensions(), MHD_gtls_server_name_recv_params(), and MHD_gtls_server_name_send_params().

#define DEFAULT_EXPIRE_TIME   3600

Definition at line 76 of file gnutls_int.h.

Referenced by MHD__gnutls_init().

#define DEFAULT_LOWAT   1

Definition at line 73 of file gnutls_int.h.

Referenced by MHD__gnutls_init().

#define DEFAULT_MAX_RECORD_SIZE   16384

Definition at line 79 of file gnutls_int.h.

Referenced by MHD__gnutls_init(), MHD_gtls_handshake_internal_state_clear(), and MHD_gtls_max_record_send_params().

#define DEFAULT_VERIFY_BITS   16*1024

Definition at line 93 of file gnutls_int.h.

Referenced by MHD__gnutls_certificate_allocate_credentials().

#define DEFAULT_VERIFY_DEPTH   32

Definition at line 92 of file gnutls_int.h.

Referenced by MHD__gnutls_certificate_allocate_credentials().

#define EXTRA_COMP_SIZE   2048

Definition at line 84 of file gnutls_int.h.

Referenced by get_temp_recv_buffer(), MHD__gnutls_m_plaintext2compressed(), and MHD_gtls_decompress().

#define GNUTLS_INT_TO_POINTER (  )     ((void*) GNUTLS_POINTER_TO_INT_CAST (_))

Definition at line 106 of file gnutls_int.h.

#define GNUTLS_PK_ANY   (enum MHD_GNUTLS_PublicKeyAlgorithm)-1

Definition at line 174 of file gnutls_int.h.

Referenced by MHD__gnutls_server_find_pk_algos_in_ciphersuites(), and MHD_gtls_server_select_cert().

#define GNUTLS_PK_NONE   (enum MHD_GNUTLS_PublicKeyAlgorithm)-2

Definition at line 175 of file gnutls_int.h.

Referenced by MHD__gnutls_server_find_pk_algos_in_ciphersuites().

#define GNUTLS_POINTER_TO_INT (  )     ((int) GNUTLS_POINTER_TO_INT_CAST (_))

Definition at line 105 of file gnutls_int.h.

Referenced by MHD__gnutls_read(), and MHD_gtls_io_write_buffered().

#define GNUTLS_POINTER_TO_INT_CAST   (long)

Definition at line 103 of file gnutls_int.h.

#define HANDSHAKE_HEADER_SIZE   4

Definition at line 88 of file gnutls_int.h.

Referenced by MHD__gnutls_recv_handshake_header(), and MHD_gtls_send_handshake().

#define HASH2MAC (  )     ((enum MHD_GNUTLS_HashAlgorithm)x)

Definition at line 99 of file gnutls_int.h.

#define INITIAL_RECV_BUFFER_SIZE   256

Definition at line 70 of file gnutls_int.h.

Referenced by MHD__gnutls_init().

#define KEYRING_HACK

Definition at line 37 of file gnutls_int.h.

#define MAX ( X,
 )     ((X) > (Y) ? (X) : (Y))

Definition at line 39 of file gnutls_int.h.

Referenced by MHD_gtls_string_append_data().

#define MAX16   65535

Definition at line 43 of file gnutls_int.h.

#define MAX24   16777215

Definition at line 42 of file gnutls_int.h.

#define MAX32   4294967295

Definition at line 41 of file gnutls_int.h.

#define MAX_ALGOS   16

Definition at line 141 of file gnutls_int.h.

Referenced by _set_priority(), and MHD_gtls_selected_cert_supported_kx().

#define MAX_CIPHERSUITES   256

Definition at line 143 of file gnutls_int.h.

#define MAX_EXT_TYPES   64

Definition at line 64 of file gnutls_int.h.

Referenced by MHD__gnutls_extension_list_add().

#define MAX_HANDSHAKE_PACKET_SIZE   48*1024

Definition at line 48 of file gnutls_int.h.

Referenced by MHD__gnutls_init().

#define MAX_HASH_SIZE   64

Definition at line 56 of file gnutls_int.h.

Referenced by MHD_gnutls_mac_deinit_ssl3(), MHD_gnutls_mac_deinit_ssl3_handshake(), MHD_gnutls_ssl3_generate_random(), MHD_gnutls_ssl3_hash_md5(), MHD_gtls_ciphertext2compressed(), MHD_gtls_compressed2ciphertext(), and ssl3_md5().

#define MAX_LOG_SIZE   1024

Definition at line 58 of file gnutls_int.h.

#define MAX_PAD_SIZE   255

Definition at line 83 of file gnutls_int.h.

#define MAX_RECORD_OVERHEAD   MAX_PAD_SIZE+EXTRA_COMP_SIZE

Definition at line 85 of file gnutls_int.h.

Referenced by MHD_gtls_send_int().

#define MAX_RECORD_RECV_SIZE   (size_t)session->security_parameters.max_record_recv_size

Definition at line 82 of file gnutls_int.h.

Referenced by get_temp_recv_buffer(), MHD__gnutls_m_compressed2plaintext(), and MHD_gtls_decrypt().

#define MAX_RECORD_SEND_SIZE   (size_t)session->security_parameters.max_record_send_size

Definition at line 81 of file gnutls_int.h.

Referenced by MHD__gnutls_m_plaintext2compressed(), and MHD_gtls_send_int().

#define MAX_RECV_SIZE   MAX_RECORD_OVERHEAD+MAX_RECORD_RECV_SIZE+RECORD_HEADER_SIZE

Definition at line 86 of file gnutls_int.h.

Referenced by MHD_gtls_io_read_buffered(), and MHD_gtls_recv_int().

#define MAX_SERVER_NAME_EXTENSIONS   3

Definition at line 260 of file gnutls_int.h.

Referenced by MHD_gtls_server_name_recv_params().

#define MAX_SERVER_NAME_SIZE   128

Definition at line 60 of file gnutls_int.h.

Referenced by MHD_gtls_server_name_recv_params().

#define MAX_SRP_USERNAME   128

Definition at line 59 of file gnutls_int.h.

#define MHD__gnutls_get_adv_version_major ( session   )     session->internals.adv_version_major

Definition at line 663 of file gnutls_int.h.

Referenced by MHD__gnutls_proc_rsa_client_kx(), and MHD_gtls_get_adv_version().

#define MHD__gnutls_get_adv_version_minor ( session   )     session->internals.adv_version_minor

Definition at line 666 of file gnutls_int.h.

Referenced by MHD__gnutls_proc_rsa_client_kx(), and MHD_gtls_get_adv_version().

#define MHD_gtls_buffer_append   MHD_gtls_string_append_data

Definition at line 136 of file gnutls_int.h.

Referenced by MHD__gnutls_buffer_insert(), MHD__gnutls_gen_supplemental(), MHD_gnutls_record_buffer_put(), and MHD_gtls_handshake_buffer_put().

#define MHD_gtls_buffer_clear   MHD_gtls_string_clear

Definition at line 135 of file gnutls_int.h.

Referenced by MHD__gnutls_deinit(), MHD__gnutls_send_supplemental(), and MHD_gtls_handshake_buffer_clear().

#define MHD_gtls_buffer_init ( buf   )     MHD_gtls_string_init(buf, MHD_gnutls_malloc, MHD_gnutls_realloc, MHD_gnutls_free);

Definition at line 134 of file gnutls_int.h.

Referenced by MHD__gnutls_init(), and MHD__gnutls_send_supplemental().

#define RECORD_HEADER_SIZE   5

Definition at line 80 of file gnutls_int.h.

Referenced by MHD_gtls_recv_int(), and MHD_gtls_send_int().

#define set_adv_version ( session,
major,
minor   ) 

Value:

session->internals.adv_version_major = major; \
        session->internals.adv_version_minor = minor

Definition at line 669 of file gnutls_int.h.

Referenced by MHD__gnutls_read_client_hello().

#define TLS_MASTER_SIZE   48

Definition at line 52 of file gnutls_int.h.

#define TLS_MAX_SESSION_ID_SIZE   32

Definition at line 51 of file gnutls_int.h.

Referenced by MHD__gnutls_read_client_hello(), MHD__gnutls_send_server_hello(), and MHD_gtls_generate_session_id().

#define TLS_RANDOM_SIZE   32

Definition at line 50 of file gnutls_int.h.


Typedef Documentation

typedef struct MHD_gtls_auth_cred_st auth_cred_st

typedef void(*) LOG_FUNC(int, const char *)

Definition at line 179 of file gnutls_int.h.

typedef MHD_gtls_string MHD_gtls_buffer

Definition at line 132 of file gnutls_int.h.

typedef struct MHD_gtls_dh_params_int MHD_gtls_dh_params_st

typedef enum tls_ext_parse_type_t MHD_gtls_ext_parse_type_t

typedef struct MHD_gtls_key* MHD_gtls_key_st

Definition at line 236 of file gnutls_int.h.

typedef unsigned char opaque

Definition at line 108 of file gnutls_int.h.


Enumeration Type Documentation

enum change_cipher_spec_t

Enumerator:
GNUTLS_TYPE_CHANGE_CIPHER_SPEC 

Definition at line 116 of file gnutls_int.h.

enum cipher_type_t

Enumerator:
CIPHER_STREAM 
CIPHER_BLOCK 

Definition at line 156 of file gnutls_int.h.

enum content_type_t

Enumerator:
GNUTLS_CHANGE_CIPHER_SPEC 
GNUTLS_ALERT 
GNUTLS_HANDSHAKE 
GNUTLS_APPLICATION_DATA 
GNUTLS_INNER_APPLICATION 

Definition at line 167 of file gnutls_int.h.

enum extensions_t

Enumerator:
GNUTLS_EXTENSION_SERVER_NAME 
GNUTLS_EXTENSION_MAX_RECORD_SIZE 
GNUTLS_EXTENSION_CERT_TYPE 
GNUTLS_EXTENSION_SRP 
GNUTLS_EXTENSION_INNER_APPLICATION 

Definition at line 145 of file gnutls_int.h.

enum handshake_state_t

Enumerator:
STATE0 
STATE1 
STATE2 
STATE3 
STATE4 
STATE5 
STATE6 
STATE7 
STATE8 
STATE9 
STATE20 
STATE21 
STATE30 
STATE31 
STATE50 
STATE60 
STATE61 
STATE62 
STATE70 
STATE71 

Definition at line 121 of file gnutls_int.h.

enum resumable_session_t

Enumerator:
RESUME_TRUE 
RESUME_FALSE 

Definition at line 161 of file gnutls_int.h.

enum tls_ext_parse_type_t

Enumerator:
EXTENSION_ANY 
EXTENSION_APPLICATION 
EXTENSION_TLS 

Definition at line 290 of file gnutls_int.h.

enum valid_session_t

Enumerator:
VALID_TRUE 
VALID_FALSE 

Definition at line 159 of file gnutls_int.h.


Function Documentation

void MHD_gtls_free_auth_info ( MHD_gtls_session_t  session  ) 

Definition at line 247 of file gnutls_auth.c.

References MHD_gtls_key::auth_info, MHD_gtls_key::auth_info_size, MHD_gtls_key::auth_info_type, MHD_gtls_cert_auth_info_st::dh, MHD_gtls_session_int::key, MHD__gnutls_free_datum, MHD_gnutls_assert, MHD_GNUTLS_CRD_CERTIFICATE, MHD_gnutls_free, MHD_gtls_free_dh_info(), MHD_gtls_free_rsa_info(), MHD_gtls_get_auth_info(), MHD_gtls_cert_auth_info_st::ncerts, MHD_gtls_cert_auth_info_st::raw_certificate_list, and MHD_gtls_cert_auth_info_st::rsa_export.

Referenced by MHD__gnutls_deinit(), and MHD_gtls_auth_info_set().

Here is the call graph for this function:

Here is the caller graph for this function:

enum MHD_GNUTLS_Protocol MHD_gtls_get_adv_version ( MHD_gtls_session_t   ) 

Definition at line 2921 of file gnutls_handshake.c.

References MHD__gnutls_get_adv_version_major, MHD__gnutls_get_adv_version_minor, and MHD_gtls_version_get().

Referenced by MHD__gnutls_gen_rsa_client_kx().

Here is the call graph for this function:

Here is the caller graph for this function:

void MHD_gtls_set_current_version ( MHD_gtls_session_t  session,
enum MHD_GNUTLS_Protocol  version 
)

Definition at line 59 of file gnutls_record.c.

References MHD_gtls_session_int::security_parameters, and MHD_gtls_security_param_st::version.

Referenced by MHD_gtls_negotiate_version(), and resume_copy_required_values().

Here is the caller graph for this function:


Generated on Sun Nov 16 16:57:52 2008 for GNU libmicrohttpd by  doxygen 1.5.1