gnutls_algorithms.c File Reference

#include "gnutls_int.h"
#include "gnutls_algorithms.h"
#include "gnutls_errors.h"
#include "gnutls_cert.h"
#include "common.h"

Include dependency graph for gnutls_algorithms.c:

Go to the source code of this file.

Defines

#define GNUTLS_KX_MAP_LOOP(b)
#define GNUTLS_KX_MAP_ALG_LOOP_SERVER(a)   GNUTLS_KX_MAP_LOOP( if(p->server_type == type) { a; break; })
#define GNUTLS_KX_MAP_ALG_LOOP_CLIENT(a)   GNUTLS_KX_MAP_LOOP( if(p->client_type == type) { a; break; })
#define GNUTLS_PK_MAP_LOOP(b)
#define GNUTLS_PK_MAP_ALG_LOOP(a)   GNUTLS_PK_MAP_LOOP( if(p->kx_algorithm == kx_algorithm) { a; break; })
#define GNUTLS_VERSION_LOOP(b)
#define GNUTLS_VERSION_ALG_LOOP(a)   GNUTLS_VERSION_LOOP( if(p->id == version) { a; break; })
#define GNUTLS_LOOP(b)
#define GNUTLS_ALG_LOOP(a)   GNUTLS_LOOP( if(p->id == algorithm) { a; break; } )
#define GNUTLS_HASH_LOOP(b)
#define GNUTLS_HASH_ALG_LOOP(a)   GNUTLS_HASH_LOOP( if(p->id == algorithm) { a; break; } )
#define GNUTLS_COMPRESSION_ENTRY(name, id, wb, ml, cl)   { #name, name, id, wb, ml, cl}
#define MAX_COMP_METHODS   5
#define GNUTLS_COMPRESSION_LOOP(b)
#define GNUTLS_COMPRESSION_ALG_LOOP(a)   GNUTLS_COMPRESSION_LOOP( if(p->id == algorithm) { a; break; } )
#define GNUTLS_COMPRESSION_ALG_LOOP_NUM(a)   GNUTLS_COMPRESSION_LOOP( if(p->num == num) { a; break; } )
#define GNUTLS_KX_LOOP(b)
#define GNUTLS_KX_ALG_LOOP(a)   GNUTLS_KX_LOOP( if(p->algorithm == algorithm) { a; break; } )
#define GNUTLS_CIPHER_SUITE_ENTRY(name, block_algorithm, kx_algorithm, mac_algorithm, version)   { #name, {name}, block_algorithm, kx_algorithm, mac_algorithm, version }
#define GNUTLS_RSA_NULL_MD5   { 0x00, 0x01 }
#define GNUTLS_PSK_SHA_ARCFOUR_SHA1   { 0x00, 0x8A }
#define GNUTLS_PSK_SHA_3DES_EDE_CBC_SHA1   { 0x00, 0x8B }
#define GNUTLS_PSK_SHA_AES_128_CBC_SHA1   { 0x00, 0x8C }
#define GNUTLS_PSK_SHA_AES_256_CBC_SHA1   { 0x00, 0x8D }
#define GNUTLS_DHE_PSK_SHA_ARCFOUR_SHA1   { 0x00, 0x8E }
#define GNUTLS_DHE_PSK_SHA_3DES_EDE_CBC_SHA1   { 0x00, 0x8F }
#define GNUTLS_DHE_PSK_SHA_AES_128_CBC_SHA1   { 0x00, 0x90 }
#define GNUTLS_DHE_PSK_SHA_AES_256_CBC_SHA1   { 0x00, 0x91 }
#define GNUTLS_SRP_SHA_3DES_EDE_CBC_SHA1   { 0xC0, 0x1A }
#define GNUTLS_SRP_SHA_RSA_3DES_EDE_CBC_SHA1   { 0xC0, 0x1B }
#define GNUTLS_SRP_SHA_DSS_3DES_EDE_CBC_SHA1   { 0xC0, 0x1C }
#define GNUTLS_SRP_SHA_AES_128_CBC_SHA1   { 0xC0, 0x1D }
#define GNUTLS_SRP_SHA_RSA_AES_128_CBC_SHA1   { 0xC0, 0x1E }
#define GNUTLS_SRP_SHA_DSS_AES_128_CBC_SHA1   { 0xC0, 0x1F }
#define GNUTLS_SRP_SHA_AES_256_CBC_SHA1   { 0xC0, 0x20 }
#define GNUTLS_SRP_SHA_RSA_AES_256_CBC_SHA1   { 0xC0, 0x21 }
#define GNUTLS_SRP_SHA_DSS_AES_256_CBC_SHA1   { 0xC0, 0x22 }
#define GNUTLS_RSA_ARCFOUR_SHA1   { 0x00, 0x05 }
#define GNUTLS_RSA_ARCFOUR_MD5   { 0x00, 0x04 }
#define GNUTLS_RSA_3DES_EDE_CBC_SHA1   { 0x00, 0x0A }
#define GNUTLS_RSA_AES_128_CBC_SHA1   { 0x00, 0x2F }
#define GNUTLS_RSA_AES_256_CBC_SHA1   { 0x00, 0x35 }
#define GNUTLS_RSA_CAMELLIA_128_CBC_SHA1   { 0x00,0x41 }
#define GNUTLS_RSA_CAMELLIA_256_CBC_SHA1   { 0x00,0x84 }
#define GNUTLS_DHE_DSS_3DES_EDE_CBC_SHA1   { 0x00, 0x13 }
#define GNUTLS_DHE_DSS_ARCFOUR_SHA1   { 0x00, 0x66 }
#define GNUTLS_DHE_DSS_AES_256_CBC_SHA1   { 0x00, 0x38 }
#define GNUTLS_DHE_DSS_AES_128_CBC_SHA1   { 0x00, 0x32 }
#define GNUTLS_DHE_DSS_CAMELLIA_128_CBC_SHA1   { 0x00,0x44 }
#define GNUTLS_DHE_DSS_CAMELLIA_256_CBC_SHA1   { 0x00,0x87 }
#define GNUTLS_DHE_RSA_3DES_EDE_CBC_SHA1   { 0x00, 0x16 }
#define GNUTLS_DHE_RSA_AES_128_CBC_SHA1   { 0x00, 0x33 }
#define GNUTLS_DHE_RSA_AES_256_CBC_SHA1   { 0x00, 0x39 }
#define GNUTLS_DHE_RSA_CAMELLIA_128_CBC_SHA1   { 0x00,0x45 }
#define GNUTLS_DHE_RSA_CAMELLIA_256_CBC_SHA1   { 0x00,0x88 }
#define CIPHER_SUITES_COUNT   sizeof(MHD_gtls_cs_algorithms)/sizeof(MHD_gtls_cipher_suite_entry)-1
#define GNUTLS_CIPHER_SUITE_LOOP(b)
#define GNUTLS_CIPHER_SUITE_ALG_LOOP(a)   GNUTLS_CIPHER_SUITE_LOOP( if( (p->id.suite[0] == suite->suite[0]) && (p->id.suite[1] == suite->suite[1])) { a; break; } )
#define SWAP(x, y)
#define MAX_ELEM_SIZE   4
#define MIN_PRIVATE_COMP_ALGO   0xEF
#define SUPPORTED_COMPRESSION_METHODS   session->internals.priorities.compression.num_algorithms
#define GNUTLS_SIGN_LOOP(b)
#define GNUTLS_SIGN_ALG_LOOP(a)   GNUTLS_SIGN_LOOP( if(p->id && p->id == sign) { a; break; } )

Typedefs

typedef struct
MHD_gnutls_cipher_entry 
MHD_gnutls_cipher_entry
typedef struct
MHD_gnutls_hash_entry 
MHD_gnutls_hash_entry
typedef struct
MHD_gtls_kx_algo_entry 
MHD_gtls_kx_algo_entry_t
typedef struct
MHD_gnutls_sign_entry 
MHD_gnutls_sign_entry
typedef struct MHD_gnutls_pk_entry MHD_gnutls_pk_entry

Functions

int MHD_gtls_mac_priority (MHD_gtls_session_t session, enum MHD_GNUTLS_HashAlgorithm algorithm)
int MHD_gnutls_mac_is_ok (enum MHD_GNUTLS_HashAlgorithm algorithm)
const char * MHD_gtls_compression_get_name (enum MHD_GNUTLS_CompressionMethod algorithm)
enum MHD_GNUTLS_CompressionMethod MHD_gtls_compression_get_id (const char *name)
int MHD_gtls_compression_get_num (enum MHD_GNUTLS_CompressionMethod algorithm)
int MHD_gtls_compression_get_wbits (enum MHD_GNUTLS_CompressionMethod algorithm)
int MHD_gtls_compression_get_mem_level (enum MHD_GNUTLS_CompressionMethod algorithm)
int MHD_gtls_compression_get_comp_level (enum MHD_GNUTLS_CompressionMethod algorithm)
enum MHD_GNUTLS_CompressionMethod MHD_gtls_compression_get_id_from_int (int num)
int MHD_gtls_compression_is_ok (enum MHD_GNUTLS_CompressionMethod algorithm)
int MHD_gtls_cipher_get_block_size (enum MHD_GNUTLS_CipherAlgorithm algorithm)
int MHD_gtls_cipher_priority (MHD_gtls_session_t session, enum MHD_GNUTLS_CipherAlgorithm algorithm)
int MHD_gtls_cipher_is_block (enum MHD_GNUTLS_CipherAlgorithm algorithm)
size_t MHD__gnutls_cipher_get_key_size (enum MHD_GNUTLS_CipherAlgorithm algorithm)
int MHD_gtls_cipher_get_iv_size (enum MHD_GNUTLS_CipherAlgorithm algorithm)
int MHD_gtls_cipher_get_export_flag (enum MHD_GNUTLS_CipherAlgorithm algorithm)
int MHD_gtls_cipher_is_ok (enum MHD_GNUTLS_CipherAlgorithm algorithm)
MHD_gtls_mod_auth_stMHD_gtls_kx_auth_struct (enum MHD_GNUTLS_KeyExchangeAlgorithm algorithm)
int MHD_gtls_kx_priority (MHD_gtls_session_t session, enum MHD_GNUTLS_KeyExchangeAlgorithm algorithm)
int MHD_gtls_kx_is_ok (enum MHD_GNUTLS_KeyExchangeAlgorithm algorithm)
int MHD_gtls_kx_needs_rsa_params (enum MHD_GNUTLS_KeyExchangeAlgorithm algorithm)
int MHD_gtls_kx_needs_dh_params (enum MHD_GNUTLS_KeyExchangeAlgorithm algorithm)
int MHD_gtls_version_priority (MHD_gtls_session_t session, enum MHD_GNUTLS_Protocol version)
enum MHD_GNUTLS_Protocol MHD_gtls_version_max (MHD_gtls_session_t session)
int MHD_gtls_version_get_minor (enum MHD_GNUTLS_Protocol version)
enum MHD_GNUTLS_Protocol MHD_gtls_version_get (int major, int minor)
int MHD_gtls_version_get_major (enum MHD_GNUTLS_Protocol version)
int MHD_gtls_version_is_supported (MHD_gtls_session_t session, const enum MHD_GNUTLS_Protocol version)
enum MHD_GNUTLS_CredentialsType MHD_gtls_map_kx_get_cred (enum MHD_GNUTLS_KeyExchangeAlgorithm algorithm, int server)
enum MHD_GNUTLS_CipherAlgorithm MHD_gtls_cipher_suite_get_cipher_algo (const cipher_suite_st *suite)
enum MHD_GNUTLS_Protocol MHD_gtls_cipher_suite_get_version (const cipher_suite_st *suite)
enum
MHD_GNUTLS_KeyExchangeAlgorithm 
MHD_gtls_cipher_suite_get_kx_algo (const cipher_suite_st *suite)
enum MHD_GNUTLS_HashAlgorithm MHD_gtls_cipher_suite_get_mac_algo (const cipher_suite_st *suite)
const char * MHD_gtls_cipher_suite_get_name (cipher_suite_st *suite)
static int MHD__gnutls_cipher_suite_is_ok (cipher_suite_st *suite)
static int MHD__gnutls_partition (MHD_gtls_session_t session, void *_base, size_t nmemb, size_t size, int(*compar)(MHD_gtls_session_t, const void *, const void *))
static void MHD__gnutls_qsort (MHD_gtls_session_t session, void *_base, size_t nmemb, size_t size, int(*compar)(MHD_gtls_session_t, const void *, const void *))
static int MHD__gnutls_compare_algo (MHD_gtls_session_t session, const void *i_A1, const void *i_A2)
int MHD_gtls_supported_ciphersuites_sorted (MHD_gtls_session_t session, cipher_suite_st **ciphers)
int MHD_gtls_supported_ciphersuites (MHD_gtls_session_t session, cipher_suite_st **_ciphers)
int MHD_gtls_supported_compression_methods (MHD_gtls_session_t session, uint8_t **comp)
enum MHD_GNUTLS_PublicKeyAlgorithm MHD_gtls_map_pk_get_pk (enum MHD_GNUTLS_KeyExchangeAlgorithm kx_algorithm)
enum encipher_type MHD_gtls_kx_encipher_type (enum MHD_GNUTLS_KeyExchangeAlgorithm kx_algorithm)
enum MHD_GNUTLS_PublicKeyAlgorithm MHD_gtls_x509_oid2pk_algorithm (const char *oid)

Variables

static const MHD_gnutls_cred_map MHD_gtls_cred_mappings []
static const MHD_gnutls_pk_map MHD_gtls_pk_mappings []
static const
MHD_gnutls_version_entry 
MHD_gtls_sup_versions []
static enum MHD_GNUTLS_Protocol MHD_gtls_supported_protocols []
static const
MHD_gnutls_cipher_entry 
MHD_gtls_algorithms []
static enum
MHD_GNUTLS_CipherAlgorithm 
MHD_gtls_supported_ciphers []
static const MHD_gnutls_hash_entry MHD_gtls_hash_algorithms []
static enum
MHD_GNUTLS_HashAlgorithm 
MHD_gtls_supported_macs []
const int MHD__gnutls_comp_algorithms_size = MAX_COMP_METHODS
MHD_gnutls_compression_entry MHD__gnutls_compression_algorithms [MAX_COMP_METHODS]
static enum
MHD_GNUTLS_CompressionMethod 
MHD_gtls_supported_compressions []
MHD_gtls_mod_auth_st MHD_gtls_rsa_auth_struct
MHD_gtls_mod_auth_st MHD_rsa_export_auth_struct
MHD_gtls_mod_auth_st MHD_gtls_dhe_rsa_auth_struct
MHD_gtls_mod_auth_st MHD_gtls_dhe_dss_auth_struct
MHD_gtls_mod_auth_st srp_auth_struct
MHD_gtls_mod_auth_st psk_auth_struct
MHD_gtls_mod_auth_st dhe_psk_auth_struct
MHD_gtls_mod_auth_st srp_rsa_auth_struct
MHD_gtls_mod_auth_st srp_dss_auth_struct
static const
MHD_gtls_kx_algo_entry_t 
MHD_gtls_kx_algorithms []
static enum
MHD_GNUTLS_KeyExchangeAlgorithm 
MHD_gtls_supported_kxs []
static const
MHD_gtls_cipher_suite_entry 
MHD_gtls_cs_algorithms []
static enum
MHD_GNUTLS_CertificateType 
MHD_gtls_supported_certificate_types []
static const MHD_gnutls_sign_entry MHD_gtls_sign_algorithms []
static const MHD_gnutls_pk_entry MHD_gtls_pk_algorithms []


Define Documentation

#define CIPHER_SUITES_COUNT   sizeof(MHD_gtls_cs_algorithms)/sizeof(MHD_gtls_cipher_suite_entry)-1

Definition at line 465 of file gnutls_algorithms.c.

Referenced by MHD_gtls_supported_ciphersuites().

#define GNUTLS_ALG_LOOP (  )     GNUTLS_LOOP( if(p->id == algorithm) { a; break; } )

#define GNUTLS_CIPHER_SUITE_ALG_LOOP (  )     GNUTLS_CIPHER_SUITE_LOOP( if( (p->id.suite[0] == suite->suite[0]) && (p->id.suite[1] == suite->suite[1])) { a; break; } )

#define GNUTLS_CIPHER_SUITE_ENTRY ( name,
block_algorithm,
kx_algorithm,
mac_algorithm,
version   )     { #name, {name}, block_algorithm, kx_algorithm, mac_algorithm, version }

Definition at line 372 of file gnutls_algorithms.c.

#define GNUTLS_CIPHER_SUITE_LOOP (  ) 

Value:

const MHD_gtls_cipher_suite_entry *p; \
                for(p = MHD_gtls_cs_algorithms; p->name != NULL; p++) { b ; }

Definition at line 501 of file gnutls_algorithms.c.

#define GNUTLS_COMPRESSION_ALG_LOOP (  )     GNUTLS_COMPRESSION_LOOP( if(p->id == algorithm) { a; break; } )

#define GNUTLS_COMPRESSION_ALG_LOOP_NUM (  )     GNUTLS_COMPRESSION_LOOP( if(p->num == num) { a; break; } )

Definition at line 315 of file gnutls_algorithms.c.

Referenced by MHD_gtls_compression_get_id_from_int().

#define GNUTLS_COMPRESSION_ENTRY ( name,
id,
wb,
ml,
cl   )     { #name, name, id, wb, ml, cl}

Definition at line 287 of file gnutls_algorithms.c.

#define GNUTLS_COMPRESSION_LOOP (  ) 

Value:

const MHD_gnutls_compression_entry *p; \
                for(p = MHD__gnutls_compression_algorithms; p->name != NULL; p++) { b ; }

Definition at line 310 of file gnutls_algorithms.c.

Referenced by MHD_gtls_compression_get_id().

#define GNUTLS_DHE_DSS_3DES_EDE_CBC_SHA1   { 0x00, 0x13 }

Definition at line 437 of file gnutls_algorithms.c.

#define GNUTLS_DHE_DSS_AES_128_CBC_SHA1   { 0x00, 0x32 }

Definition at line 446 of file gnutls_algorithms.c.

#define GNUTLS_DHE_DSS_AES_256_CBC_SHA1   { 0x00, 0x38 }

Definition at line 445 of file gnutls_algorithms.c.

#define GNUTLS_DHE_DSS_ARCFOUR_SHA1   { 0x00, 0x66 }

Definition at line 441 of file gnutls_algorithms.c.

#define GNUTLS_DHE_DSS_CAMELLIA_128_CBC_SHA1   { 0x00,0x44 }

Definition at line 449 of file gnutls_algorithms.c.

#define GNUTLS_DHE_DSS_CAMELLIA_256_CBC_SHA1   { 0x00,0x87 }

Definition at line 450 of file gnutls_algorithms.c.

#define GNUTLS_DHE_PSK_SHA_3DES_EDE_CBC_SHA1   { 0x00, 0x8F }

Definition at line 401 of file gnutls_algorithms.c.

#define GNUTLS_DHE_PSK_SHA_AES_128_CBC_SHA1   { 0x00, 0x90 }

Definition at line 402 of file gnutls_algorithms.c.

#define GNUTLS_DHE_PSK_SHA_AES_256_CBC_SHA1   { 0x00, 0x91 }

Definition at line 403 of file gnutls_algorithms.c.

#define GNUTLS_DHE_PSK_SHA_ARCFOUR_SHA1   { 0x00, 0x8E }

Definition at line 400 of file gnutls_algorithms.c.

#define GNUTLS_DHE_RSA_3DES_EDE_CBC_SHA1   { 0x00, 0x16 }

Definition at line 454 of file gnutls_algorithms.c.

#define GNUTLS_DHE_RSA_AES_128_CBC_SHA1   { 0x00, 0x33 }

Definition at line 458 of file gnutls_algorithms.c.

#define GNUTLS_DHE_RSA_AES_256_CBC_SHA1   { 0x00, 0x39 }

Definition at line 459 of file gnutls_algorithms.c.

#define GNUTLS_DHE_RSA_CAMELLIA_128_CBC_SHA1   { 0x00,0x45 }

Definition at line 462 of file gnutls_algorithms.c.

#define GNUTLS_DHE_RSA_CAMELLIA_256_CBC_SHA1   { 0x00,0x88 }

Definition at line 463 of file gnutls_algorithms.c.

#define GNUTLS_HASH_ALG_LOOP (  )     GNUTLS_HASH_LOOP( if(p->id == algorithm) { a; break; } )

Definition at line 283 of file gnutls_algorithms.c.

Referenced by MHD_gnutls_mac_is_ok().

#define GNUTLS_HASH_LOOP (  ) 

Value:

const MHD_gnutls_hash_entry *p; \
                for(p = MHD_gtls_hash_algorithms; p->name != NULL; p++) { b ; }

Definition at line 279 of file gnutls_algorithms.c.

#define GNUTLS_KX_ALG_LOOP (  )     GNUTLS_KX_LOOP( if(p->algorithm == algorithm) { a; break; } )

#define GNUTLS_KX_LOOP (  ) 

Value:

const MHD_gtls_kx_algo_entry_t *p; \
                for(p = MHD_gtls_kx_algorithms; p->name != NULL; p++) { b ; }

Definition at line 364 of file gnutls_algorithms.c.

#define GNUTLS_KX_MAP_ALG_LOOP_CLIENT (  )     GNUTLS_KX_MAP_LOOP( if(p->client_type == type) { a; break; })

Definition at line 63 of file gnutls_algorithms.c.

#define GNUTLS_KX_MAP_ALG_LOOP_SERVER (  )     GNUTLS_KX_MAP_LOOP( if(p->server_type == type) { a; break; })

Definition at line 60 of file gnutls_algorithms.c.

#define GNUTLS_KX_MAP_LOOP (  ) 

Value:

const MHD_gnutls_cred_map *p; \
                for(p = MHD_gtls_cred_mappings; p->algorithm != 0; p++) { b ; }

Definition at line 56 of file gnutls_algorithms.c.

Referenced by MHD_gtls_map_kx_get_cred().

#define GNUTLS_LOOP (  ) 

Value:

const MHD_gnutls_cipher_entry *p; \
                for(p = MHD_gtls_algorithms; p->name != NULL; p++) { b ; }

Definition at line 231 of file gnutls_algorithms.c.

#define GNUTLS_PK_MAP_ALG_LOOP (  )     GNUTLS_PK_MAP_LOOP( if(p->kx_algorithm == kx_algorithm) { a; break; })

Definition at line 101 of file gnutls_algorithms.c.

Referenced by MHD_gtls_kx_encipher_type(), and MHD_gtls_map_pk_get_pk().

#define GNUTLS_PK_MAP_LOOP (  ) 

Value:

const MHD_gnutls_pk_map *p; \
                for(p = MHD_gtls_pk_mappings; p->kx_algorithm != 0; p++) { b }

Definition at line 97 of file gnutls_algorithms.c.

#define GNUTLS_PSK_SHA_3DES_EDE_CBC_SHA1   { 0x00, 0x8B }

Definition at line 396 of file gnutls_algorithms.c.

#define GNUTLS_PSK_SHA_AES_128_CBC_SHA1   { 0x00, 0x8C }

Definition at line 397 of file gnutls_algorithms.c.

#define GNUTLS_PSK_SHA_AES_256_CBC_SHA1   { 0x00, 0x8D }

Definition at line 398 of file gnutls_algorithms.c.

#define GNUTLS_PSK_SHA_ARCFOUR_SHA1   { 0x00, 0x8A }

Definition at line 395 of file gnutls_algorithms.c.

#define GNUTLS_RSA_3DES_EDE_CBC_SHA1   { 0x00, 0x0A }

Definition at line 423 of file gnutls_algorithms.c.

#define GNUTLS_RSA_AES_128_CBC_SHA1   { 0x00, 0x2F }

Definition at line 427 of file gnutls_algorithms.c.

#define GNUTLS_RSA_AES_256_CBC_SHA1   { 0x00, 0x35 }

Definition at line 428 of file gnutls_algorithms.c.

#define GNUTLS_RSA_ARCFOUR_MD5   { 0x00, 0x04 }

Definition at line 422 of file gnutls_algorithms.c.

#define GNUTLS_RSA_ARCFOUR_SHA1   { 0x00, 0x05 }

Definition at line 421 of file gnutls_algorithms.c.

#define GNUTLS_RSA_CAMELLIA_128_CBC_SHA1   { 0x00,0x41 }

Definition at line 431 of file gnutls_algorithms.c.

#define GNUTLS_RSA_CAMELLIA_256_CBC_SHA1   { 0x00,0x84 }

Definition at line 432 of file gnutls_algorithms.c.

#define GNUTLS_RSA_NULL_MD5   { 0x00, 0x01 }

Definition at line 390 of file gnutls_algorithms.c.

#define GNUTLS_SIGN_ALG_LOOP (  )     GNUTLS_SIGN_LOOP( if(p->id && p->id == sign) { a; break; } )

Definition at line 1298 of file gnutls_algorithms.c.

#define GNUTLS_SIGN_LOOP (  ) 

Value:

do {                                                                   \
    const MHD_gnutls_sign_entry *p;                                            \
    for(p = MHD_gtls_sign_algorithms; p->name != NULL; p++) { b ; }            \
  } while (0)

Definition at line 1292 of file gnutls_algorithms.c.

#define GNUTLS_SRP_SHA_3DES_EDE_CBC_SHA1   { 0xC0, 0x1A }

Definition at line 407 of file gnutls_algorithms.c.

#define GNUTLS_SRP_SHA_AES_128_CBC_SHA1   { 0xC0, 0x1D }

Definition at line 411 of file gnutls_algorithms.c.

#define GNUTLS_SRP_SHA_AES_256_CBC_SHA1   { 0xC0, 0x20 }

Definition at line 415 of file gnutls_algorithms.c.

#define GNUTLS_SRP_SHA_DSS_3DES_EDE_CBC_SHA1   { 0xC0, 0x1C }

Definition at line 409 of file gnutls_algorithms.c.

#define GNUTLS_SRP_SHA_DSS_AES_128_CBC_SHA1   { 0xC0, 0x1F }

Definition at line 413 of file gnutls_algorithms.c.

#define GNUTLS_SRP_SHA_DSS_AES_256_CBC_SHA1   { 0xC0, 0x22 }

Definition at line 417 of file gnutls_algorithms.c.

#define GNUTLS_SRP_SHA_RSA_3DES_EDE_CBC_SHA1   { 0xC0, 0x1B }

Definition at line 408 of file gnutls_algorithms.c.

#define GNUTLS_SRP_SHA_RSA_AES_128_CBC_SHA1   { 0xC0, 0x1E }

Definition at line 412 of file gnutls_algorithms.c.

#define GNUTLS_SRP_SHA_RSA_AES_256_CBC_SHA1   { 0xC0, 0x21 }

Definition at line 416 of file gnutls_algorithms.c.

#define GNUTLS_VERSION_ALG_LOOP (  )     GNUTLS_VERSION_LOOP( if(p->id == version) { a; break; })

#define GNUTLS_VERSION_LOOP (  ) 

Value:

const MHD_gnutls_version_entry *p; \
                for(p = MHD_gtls_sup_versions; p->name != NULL; p++) { b ; }

Definition at line 152 of file gnutls_algorithms.c.

Referenced by MHD_gtls_version_get().

#define MAX_COMP_METHODS   5

Definition at line 290 of file gnutls_algorithms.c.

#define MAX_ELEM_SIZE   4

Definition at line 957 of file gnutls_algorithms.c.

Referenced by MHD__gnutls_partition().

#define MIN_PRIVATE_COMP_ALGO   0xEF

Definition at line 1172 of file gnutls_algorithms.c.

Referenced by MHD_gtls_supported_compression_methods().

#define SUPPORTED_COMPRESSION_METHODS   session->internals.priorities.compression.num_algorithms

Definition at line 1176 of file gnutls_algorithms.c.

Referenced by MHD_gtls_supported_compression_methods().

#define SWAP ( x,
 ) 

Value:

memcpy(tmp,x,size); \
                   memcpy(x,y,size); \
                   memcpy(y,tmp,size);

Definition at line 953 of file gnutls_algorithms.c.

Referenced by MHD__gnutls_partition().


Typedef Documentation

Definition at line 169 of file gnutls_algorithms.c.

Definition at line 245 of file gnutls_algorithms.c.

Definition at line 1309 of file gnutls_algorithms.c.

Definition at line 1257 of file gnutls_algorithms.c.

typedef struct MHD_gtls_kx_algo_entry MHD_gtls_kx_algo_entry_t


Function Documentation

size_t MHD__gnutls_cipher_get_key_size ( enum MHD_GNUTLS_CipherAlgorithm  algorithm  ) 

MHD__gnutls_cipher_get_key_size - Returns the length of the cipher's key size : is an encryption algorithm

Returns: length (in bytes) of the given cipher's key size, o 0 if the given cipher is invalid.

Definition at line 689 of file gnutls_algorithms.c.

References GNUTLS_ALG_LOOP.

Referenced by MHD__gnutls_set_read_keys(), and MHD__gnutls_set_write_keys().

Here is the caller graph for this function:

static int MHD__gnutls_cipher_suite_is_ok ( cipher_suite_st suite  )  [inline, static]

Definition at line 939 of file gnutls_algorithms.c.

References GNUTLS_CIPHER_SUITE_ALG_LOOP.

static int MHD__gnutls_compare_algo ( MHD_gtls_session_t  session,
const void *  i_A1,
const void *  i_A2 
) [static]

static int MHD__gnutls_partition ( MHD_gtls_session_t  session,
void *  _base,
size_t  nmemb,
size_t  size,
int(*)(MHD_gtls_session_t, const void *, const void *)  compar 
) [inline, static]

Definition at line 959 of file gnutls_algorithms.c.

References MAX_ELEM_SIZE, and SWAP.

Referenced by MHD__gnutls_qsort().

Here is the caller graph for this function:

static void MHD__gnutls_qsort ( MHD_gtls_session_t  session,
void *  _base,
size_t  nmemb,
size_t  size,
int(*)(MHD_gtls_session_t, const void *, const void *)  compar 
) [static]

Definition at line 1007 of file gnutls_algorithms.c.

References MHD__gnutls_partition().

Referenced by MHD_gtls_supported_ciphersuites_sorted().

Here is the call graph for this function:

Here is the caller graph for this function:

int MHD_gnutls_mac_is_ok ( enum MHD_GNUTLS_HashAlgorithm  algorithm  ) 

Definition at line 525 of file gnutls_algorithms.c.

References GNUTLS_HASH_ALG_LOOP.

Referenced by MHD_gtls_read_connection_state_init(), MHD_gtls_set_read_mac(), MHD_gtls_set_write_mac(), and MHD_gtls_write_connection_state_init().

Here is the caller graph for this function:

int MHD_gtls_cipher_get_block_size ( enum MHD_GNUTLS_CipherAlgorithm  algorithm  ) 

Definition at line 649 of file gnutls_algorithms.c.

References GNUTLS_ALG_LOOP.

Referenced by MHD_gtls_ciphertext2compressed(), and MHD_gtls_compressed2ciphertext().

Here is the caller graph for this function:

int MHD_gtls_cipher_get_export_flag ( enum MHD_GNUTLS_CipherAlgorithm  algorithm  ) 

Definition at line 707 of file gnutls_algorithms.c.

References GNUTLS_ALG_LOOP.

Referenced by MHD__gnutls_set_read_keys(), MHD__gnutls_set_write_keys(), and MHD_gtls_session_is_export().

Here is the caller graph for this function:

int MHD_gtls_cipher_get_iv_size ( enum MHD_GNUTLS_CipherAlgorithm  algorithm  ) 

Definition at line 698 of file gnutls_algorithms.c.

References GNUTLS_ALG_LOOP.

Referenced by MHD__gnutls_set_read_keys(), and MHD__gnutls_set_write_keys().

Here is the caller graph for this function:

int MHD_gtls_cipher_is_block ( enum MHD_GNUTLS_CipherAlgorithm  algorithm  ) 

Definition at line 672 of file gnutls_algorithms.c.

References GNUTLS_ALG_LOOP.

Referenced by MHD_gtls_ciphertext2compressed(), and MHD_gtls_compressed2ciphertext().

Here is the caller graph for this function:

int MHD_gtls_cipher_is_ok ( enum MHD_GNUTLS_CipherAlgorithm  algorithm  ) 

Definition at line 717 of file gnutls_algorithms.c.

References GNUTLS_ALG_LOOP.

Referenced by MHD_gtls_set_read_cipher(), and MHD_gtls_set_write_cipher().

Here is the caller graph for this function:

int MHD_gtls_cipher_priority ( MHD_gtls_session_t  session,
enum MHD_GNUTLS_CipherAlgorithm  algorithm 
)

enum MHD_GNUTLS_CipherAlgorithm MHD_gtls_cipher_suite_get_cipher_algo ( const cipher_suite_st suite  ) 

enum MHD_GNUTLS_KeyExchangeAlgorithm MHD_gtls_cipher_suite_get_kx_algo ( const cipher_suite_st suite  ) 

enum MHD_GNUTLS_HashAlgorithm MHD_gtls_cipher_suite_get_mac_algo ( const cipher_suite_st suite  ) 

const char* MHD_gtls_cipher_suite_get_name ( cipher_suite_st suite  ) 

enum MHD_GNUTLS_Protocol MHD_gtls_cipher_suite_get_version ( const cipher_suite_st suite  ) 

Definition at line 901 of file gnutls_algorithms.c.

References GNUTLS_CIPHER_SUITE_ALG_LOOP.

Referenced by MHD_gtls_supported_ciphersuites().

Here is the caller graph for this function:

int MHD_gtls_compression_get_comp_level ( enum MHD_GNUTLS_CompressionMethod  algorithm  ) 

Definition at line 612 of file gnutls_algorithms.c.

References GNUTLS_COMPRESSION_ALG_LOOP.

enum MHD_GNUTLS_CompressionMethod MHD_gtls_compression_get_id ( const char *  name  ) 

MHD_gtls_compression_get_id - Returns the gnutls id of the specified in string algorithm : is a compression method name

The names are compared in a case insensitive way.

Returns: an id of the specified in a string compression method, or GNUTLS_COMP_UNKNOWN on error.

Definition at line 566 of file gnutls_algorithms.c.

References GNUTLS_COMPRESSION_LOOP, and MHD_GNUTLS_COMP_UNKNOWN.

enum MHD_GNUTLS_CompressionMethod MHD_gtls_compression_get_id_from_int ( int  num  ) 

Definition at line 625 of file gnutls_algorithms.c.

References GNUTLS_COMPRESSION_ALG_LOOP_NUM.

Referenced by MHD__gnutls_server_select_comp_method().

Here is the caller graph for this function:

int MHD_gtls_compression_get_mem_level ( enum MHD_GNUTLS_CompressionMethod  algorithm  ) 

Definition at line 602 of file gnutls_algorithms.c.

References GNUTLS_COMPRESSION_ALG_LOOP.

const char* MHD_gtls_compression_get_name ( enum MHD_GNUTLS_CompressionMethod  algorithm  ) 

MHD__gnutls_compression_get_name - Returns a string with the name of the specified compression algorithm : is a Compression algorithm

Returns: a pointer to a string that contains the name of the specified compression algorithm, or NULL.

Definition at line 545 of file gnutls_algorithms.c.

References GNUTLS_COMPRESSION_ALG_LOOP.

int MHD_gtls_compression_get_num ( enum MHD_GNUTLS_CompressionMethod  algorithm  ) 

Definition at line 582 of file gnutls_algorithms.c.

References GNUTLS_COMPRESSION_ALG_LOOP.

Referenced by MHD__gnutls_send_server_hello(), and MHD_gtls_supported_compression_methods().

Here is the caller graph for this function:

int MHD_gtls_compression_get_wbits ( enum MHD_GNUTLS_CompressionMethod  algorithm  ) 

Definition at line 593 of file gnutls_algorithms.c.

References GNUTLS_COMPRESSION_ALG_LOOP.

int MHD_gtls_compression_is_ok ( enum MHD_GNUTLS_CompressionMethod  algorithm  ) 

MHD_gtls_mod_auth_st* MHD_gtls_kx_auth_struct ( enum MHD_GNUTLS_KeyExchangeAlgorithm  algorithm  ) 

Definition at line 730 of file gnutls_algorithms.c.

References GNUTLS_KX_ALG_LOOP.

Referenced by MHD_gtls_server_select_suite().

Here is the caller graph for this function:

enum encipher_type MHD_gtls_kx_encipher_type ( enum MHD_GNUTLS_KeyExchangeAlgorithm  kx_algorithm  ) 

Definition at line 1240 of file gnutls_algorithms.c.

References CIPHER_IGN, and GNUTLS_PK_MAP_ALG_LOOP.

Referenced by MHD__gnutls_check_key_usage().

Here is the caller graph for this function:

int MHD_gtls_kx_is_ok ( enum MHD_GNUTLS_KeyExchangeAlgorithm  algorithm  ) 

Definition at line 753 of file gnutls_algorithms.c.

References GNUTLS_KX_ALG_LOOP.

Referenced by MHD_gtls_set_kx().

Here is the caller graph for this function:

int MHD_gtls_kx_needs_dh_params ( enum MHD_GNUTLS_KeyExchangeAlgorithm  algorithm  ) 

Definition at line 773 of file gnutls_algorithms.c.

References GNUTLS_KX_ALG_LOOP.

Referenced by check_server_params().

Here is the caller graph for this function:

int MHD_gtls_kx_needs_rsa_params ( enum MHD_GNUTLS_KeyExchangeAlgorithm  algorithm  ) 

Definition at line 765 of file gnutls_algorithms.c.

References GNUTLS_KX_ALG_LOOP.

Referenced by check_server_params().

Here is the caller graph for this function:

int MHD_gtls_kx_priority ( MHD_gtls_session_t  session,
enum MHD_GNUTLS_KeyExchangeAlgorithm  algorithm 
)

int MHD_gtls_mac_priority ( MHD_gtls_session_t  session,
enum MHD_GNUTLS_HashAlgorithm  algorithm 
)

enum MHD_GNUTLS_CredentialsType MHD_gtls_map_kx_get_cred ( enum MHD_GNUTLS_KeyExchangeAlgorithm  algorithm,
int  server 
)

enum MHD_GNUTLS_PublicKeyAlgorithm MHD_gtls_map_pk_get_pk ( enum MHD_GNUTLS_KeyExchangeAlgorithm  kx_algorithm  ) 

Definition at line 1227 of file gnutls_algorithms.c.

References GNUTLS_PK_MAP_ALG_LOOP.

Referenced by MHD__gnutls_server_find_pk_algos_in_ciphersuites(), and MHD_gtls_selected_cert_supported_kx().

Here is the caller graph for this function:

int MHD_gtls_supported_ciphersuites ( MHD_gtls_session_t  session,
cipher_suite_st **  _ciphers 
)

int MHD_gtls_supported_ciphersuites_sorted ( MHD_gtls_session_t  session,
cipher_suite_st **  ciphers 
)

Definition at line 1070 of file gnutls_algorithms.c.

References MHD__gnutls_compare_algo(), MHD__gnutls_qsort(), MHD_gnutls_assert, and MHD_gtls_supported_ciphersuites().

Here is the call graph for this function:

int MHD_gtls_supported_compression_methods ( MHD_gtls_session_t  session,
uint8_t **  comp 
)

enum MHD_GNUTLS_Protocol MHD_gtls_version_get ( int  major,
int  minor 
)

Definition at line 835 of file gnutls_algorithms.c.

References GNUTLS_VERSION_LOOP.

Referenced by MHD__gnutls_read_client_hello(), MHD_gtls_get_adv_version(), and record_check_version().

Here is the caller graph for this function:

int MHD_gtls_version_get_major ( enum MHD_GNUTLS_Protocol  version  ) 

int MHD_gtls_version_get_minor ( enum MHD_GNUTLS_Protocol  version  ) 

int MHD_gtls_version_is_supported ( MHD_gtls_session_t  session,
const enum MHD_GNUTLS_Protocol  version 
)

Definition at line 857 of file gnutls_algorithms.c.

References GNUTLS_VERSION_ALG_LOOP, and MHD_gtls_version_priority().

Referenced by MHD_gtls_negotiate_version().

Here is the call graph for this function:

Here is the caller graph for this function:

enum MHD_GNUTLS_Protocol MHD_gtls_version_max ( MHD_gtls_session_t  session  ) 

int MHD_gtls_version_priority ( MHD_gtls_session_t  session,
enum MHD_GNUTLS_Protocol  version 
)

enum MHD_GNUTLS_PublicKeyAlgorithm MHD_gtls_x509_oid2pk_algorithm ( const char *  oid  ) 

Definition at line 1327 of file gnutls_algorithms.c.

References MHD_GNUTLS_PK_UNKNOWN.

Referenced by MHD__gnutls_x509_get_pk_algorithm().

Here is the caller graph for this function:


Variable Documentation

const int MHD__gnutls_comp_algorithms_size = MAX_COMP_METHODS

Definition at line 291 of file gnutls_algorithms.c.

Initial value:

{
  GNUTLS_COMPRESSION_ENTRY (MHD_GNUTLS_COMP_NULL, 0x00, 0, 0, 0),
  {
  0, 0, 0, 0, 0, 0}
}

Definition at line 296 of file gnutls_algorithms.c.

Definition at line 176 of file gnutls_algorithms.c.

const MHD_gnutls_cred_map MHD_gtls_cred_mappings[] [static]

Initial value:

 {
  {MHD_GNUTLS_KX_RSA,
   MHD_GNUTLS_CRD_CERTIFICATE,
   MHD_GNUTLS_CRD_CERTIFICATE},
  {MHD_GNUTLS_KX_RSA_EXPORT,
   MHD_GNUTLS_CRD_CERTIFICATE,
   MHD_GNUTLS_CRD_CERTIFICATE},
  {0,
   0,
   0}
}

Definition at line 44 of file gnutls_algorithms.c.

const MHD_gtls_cipher_suite_entry MHD_gtls_cs_algorithms[] [static]

Definition at line 467 of file gnutls_algorithms.c.

Referenced by MHD_gtls_supported_ciphersuites().

Definition at line 63 of file auth_dhe.c.

Definition at line 46 of file auth_dhe.c.

Initial value:

 {
  {"SHA1",
   HASH_OID_SHA1,
   MHD_GNUTLS_MAC_SHA1,
   20},
  {"MD5",
   HASH_OID_MD5,
   MHD_GNUTLS_MAC_MD5,
   16},
  {"SHA256",
   HASH_OID_SHA256,
   MHD_GNUTLS_MAC_SHA256,
   32},
  {"NULL",
   NULL,
   MHD_GNUTLS_MAC_NULL,
   0},
  {0,
   0,
   0,
   0}
}

Definition at line 247 of file gnutls_algorithms.c.

Initial value:

 {
  {"RSA",
   MHD_GNUTLS_KX_RSA,
   &MHD_gtls_rsa_auth_struct,
   0,
   0},
  {"RSA-EXPORT",
   MHD_GNUTLS_KX_RSA_EXPORT,
   &MHD_rsa_export_auth_struct,
   0,
   1  },
  {0,
   0,
   0,
   0,
   0}
}

Definition at line 338 of file gnutls_algorithms.c.

Initial value:

 {
  {"RSA",
   PK_PKIX1_RSA_OID,
   MHD_GNUTLS_PK_RSA},
  {"GOST R 34.10-2001",
   PK_GOST_R3410_2001_OID,
   0},
  {"GOST R 34.10-94",
   PK_GOST_R3410_94_OID,
   0},
  {0,
   0,
   0}
}

Definition at line 1311 of file gnutls_algorithms.c.

const MHD_gnutls_pk_map MHD_gtls_pk_mappings[] [static]

Definition at line 47 of file auth_rsa.c.

Definition at line 1259 of file gnutls_algorithms.c.

const MHD_gnutls_version_entry MHD_gtls_sup_versions[] [static]

Initial value:

 {
  {"SSL3.0",
   MHD_GNUTLS_PROTOCOL_SSL3,
   3,
   0,
   1},
  {"TLS1.0",
   MHD_GNUTLS_PROTOCOL_TLS1_0,
   3,
   1,
   1},
  {"TLS1.1",
   MHD_GNUTLS_PROTOCOL_TLS1_1,
   3,
   2,
   1},
  {"TLS1.2",
   MHD_GNUTLS_PROTOCOL_TLS1_2,
   3,
   3,
   1},
  {0,
   0,
   0,
   0,
   0}
}

Definition at line 115 of file gnutls_algorithms.c.

Initial value:

Definition at line 1217 of file gnutls_algorithms.c.

Initial value:

Definition at line 304 of file gnutls_algorithms.c.

Initial value:

Definition at line 357 of file gnutls_algorithms.c.

Definition at line 50 of file auth_rsa_export.c.


Generated on Fri Feb 27 18:32:40 2009 for GNU libmicrohttpd by  doxygen 1.5.7.1