gnutls_hash_int.c File Reference

#include <gnutls_int.h>
#include <gnutls_hash_int.h>
#include <gnutls_errors.h>
Include dependency graph for gnutls_hash_int.c:

Go to the source code of this file.

Functions

static Gc_hash MHD__gnutls_mac2gc (enum MHD_GNUTLS_HashAlgorithm mac)
GNUTLS_HASH_HANDLE MHD_gtls_hash_init (enum MHD_GNUTLS_HashAlgorithm algorithm)
int MHD_gnutls_hash_get_algo_len (enum MHD_GNUTLS_HashAlgorithm algorithm)
int MHD_gnutls_hash (GNUTLS_HASH_HANDLE handle, const void *text, size_t textlen)
GNUTLS_HASH_HANDLE MHD_gnutls_hash_copy (GNUTLS_HASH_HANDLE handle)
void MHD_gnutls_hash_deinit (GNUTLS_HASH_HANDLE handle, void *digest)
mac_hd_t MHD_gtls_MHD_hmac_init (enum MHD_GNUTLS_HashAlgorithm algorithm, const void *key, int keylen)
void MHD_gnutls_MHD_hmac_deinit (mac_hd_t handle, void *digest)
static int get_padsize (enum MHD_GNUTLS_HashAlgorithm algorithm)
mac_hd_t MHD_gnutls_mac_init_ssl3 (enum MHD_GNUTLS_HashAlgorithm algorithm, void *key, int keylen)
void MHD_gnutls_mac_deinit_ssl3 (mac_hd_t handle, void *digest)
void MHD_gnutls_mac_deinit_ssl3_handshake (mac_hd_t handle, void *digest, opaque *key, uint32_t key_size)
static int ssl3_sha (int i, opaque *secret, int secret_len, opaque *rnd, int rnd_len, void *digest)
static int ssl3_md5 (int i, opaque *secret, int secret_len, opaque *rnd, int rnd_len, void *digest)
int MHD_gnutls_ssl3_hash_md5 (void *first, int first_len, void *second, int second_len, int ret_len, opaque *ret)
int MHD_gnutls_ssl3_generate_random (void *secret, int secret_len, void *rnd, int rnd_len, int ret_bytes, opaque *ret)

Function Documentation

static int get_padsize ( enum MHD_GNUTLS_HashAlgorithm  algorithm  )  [inline, static]

Definition at line 193 of file gnutls_hash_int.c.

References MHD_GNUTLS_MAC_MD5, and MHD_GNUTLS_MAC_SHA1.

Referenced by MHD_gnutls_mac_deinit_ssl3(), MHD_gnutls_mac_deinit_ssl3_handshake(), and MHD_gnutls_mac_init_ssl3().

Here is the caller graph for this function:

static Gc_hash MHD__gnutls_mac2gc ( enum MHD_GNUTLS_HashAlgorithm  mac  )  [inline, static]
int MHD_gnutls_hash ( GNUTLS_HASH_HANDLE  handle,
const void *  text,
size_t  textlen 
)
GNUTLS_HASH_HANDLE MHD_gnutls_hash_copy ( GNUTLS_HASH_HANDLE  handle  ) 

Definition at line 103 of file gnutls_hash_int.c.

References mac_hd_st::algorithm, GNUTLS_HASH_FAILED, mac_hd_st::handle, mac_hd_st::key, mac_hd_st::keysize, MHD_gc_hash_clone(), MHD_gnutls_free, and MHD_gnutls_malloc.

Referenced by MHD__gnutls_finished(), MHD__gnutls_ssl3_finished(), MHD_gtls_tls_sign_hdata(), and MHD_gtls_verify_sig_hdata().

Here is the call graph for this function:

Here is the caller graph for this function:

void MHD_gnutls_hash_deinit ( GNUTLS_HASH_HANDLE  handle,
void *  digest 
)
int MHD_gnutls_hash_get_algo_len ( enum MHD_GNUTLS_HashAlgorithm  algorithm  ) 
void MHD_gnutls_mac_deinit_ssl3 ( mac_hd_t  handle,
void *  digest 
)

Definition at line 238 of file gnutls_hash_int.c.

References mac_hd_st::algorithm, get_padsize(), GNUTLS_MAC_FAILED, mac_hd_st::key, mac_hd_st::keysize, MAX_HASH_SIZE, MHD_gnutls_assert, MHD_gnutls_hash(), MHD_gnutls_hash_deinit(), MHD_gnutls_hash_get_algo_len(), and MHD_gtls_hash_init().

Referenced by mac_deinit().

Here is the call graph for this function:

Here is the caller graph for this function:

void MHD_gnutls_mac_deinit_ssl3_handshake ( mac_hd_t  handle,
void *  digest,
opaque key,
uint32_t  key_size 
)
mac_hd_t MHD_gnutls_mac_init_ssl3 ( enum MHD_GNUTLS_HashAlgorithm  algorithm,
void *  key,
int  keylen 
)

Definition at line 207 of file gnutls_hash_int.c.

References get_padsize(), GNUTLS_HASH_FAILED, GNUTLS_MAC_FAILED, mac_hd_st::key, mac_hd_st::keysize, MHD_gnutls_assert, MHD_gnutls_hash(), and MHD_gtls_hash_init().

Referenced by mac_init().

Here is the call graph for this function:

Here is the caller graph for this function:

void MHD_gnutls_MHD_hmac_deinit ( mac_hd_t  handle,
void *  digest 
)

Definition at line 175 of file gnutls_hash_int.c.

References mac_hd_st::algorithm, mac_hd_st::handle, MHD_gc_hash_close(), MHD_gc_hash_read(), MHD_gnutls_free, and MHD_gnutls_hash_get_algo_len().

Referenced by mac_deinit(), MHD__gnutls_cal_PRF_A(), and MHD__gnutls_P_hash().

Here is the call graph for this function:

Here is the caller graph for this function:

int MHD_gnutls_ssl3_generate_random ( void *  secret,
int  secret_len,
void *  rnd,
int  rnd_len,
int  ret_bytes,
opaque ret 
)

Definition at line 407 of file gnutls_hash_int.c.

References MAX_HASH_SIZE, MHD_gnutls_assert, MHD_gnutls_hash_get_algo_len(), MHD_GNUTLS_MAC_MD5, and ssl3_md5().

Referenced by generate_normal_master(), and MHD__gnutls_set_keys().

Here is the call graph for this function:

Here is the caller graph for this function:

int MHD_gnutls_ssl3_hash_md5 ( void *  first,
int  first_len,
void *  second,
int  second_len,
int  ret_len,
opaque ret 
)

Definition at line 374 of file gnutls_hash_int.c.

References GNUTLS_E_HASH_FAILED, GNUTLS_E_INTERNAL_ERROR, MAX_HASH_SIZE, MHD_gnutls_assert, MHD_gnutls_hash(), MHD_gnutls_hash_deinit(), MHD_gnutls_hash_get_algo_len(), MHD_GNUTLS_MAC_MD5, and MHD_gtls_hash_init().

Referenced by MHD__gnutls_set_keys().

Here is the call graph for this function:

Here is the caller graph for this function:

GNUTLS_HASH_HANDLE MHD_gtls_hash_init ( enum MHD_GNUTLS_HashAlgorithm  algorithm  ) 
mac_hd_t MHD_gtls_MHD_hmac_init ( enum MHD_GNUTLS_HashAlgorithm  algorithm,
const void *  key,
int  keylen 
)

Definition at line 147 of file gnutls_hash_int.c.

References mac_hd_st::algorithm, GC_HMAC, GNUTLS_MAC_FAILED, mac_hd_st::handle, mac_hd_st::key, mac_hd_st::keysize, MHD__gnutls_mac2gc(), MHD_gc_hash_MHD_hmac_setkey(), MHD_gc_hash_open(), MHD_gnutls_free, and MHD_gnutls_malloc.

Referenced by mac_init(), MHD__gnutls_cal_PRF_A(), and MHD__gnutls_P_hash().

Here is the call graph for this function:

Here is the caller graph for this function:

static int ssl3_md5 ( int  i,
opaque secret,
int  secret_len,
opaque rnd,
int  rnd_len,
void *  digest 
) [static]

Definition at line 342 of file gnutls_hash_int.c.

References GNUTLS_E_HASH_FAILED, MAX_HASH_SIZE, MHD_gnutls_assert, MHD_gnutls_hash(), MHD_gnutls_hash_deinit(), MHD_gnutls_hash_get_algo_len(), MHD_GNUTLS_MAC_MD5, MHD_GNUTLS_MAC_SHA1, MHD_gtls_hash_init(), and ssl3_sha().

Referenced by MHD_gnutls_ssl3_generate_random().

Here is the call graph for this function:

Here is the caller graph for this function:

static int ssl3_sha ( int  i,
opaque secret,
int  secret_len,
opaque rnd,
int  rnd_len,
void *  digest 
) [static]

Definition at line 313 of file gnutls_hash_int.c.

References GNUTLS_E_HASH_FAILED, MHD_gnutls_assert, MHD_gnutls_hash(), MHD_gnutls_hash_deinit(), MHD_GNUTLS_MAC_SHA1, and MHD_gtls_hash_init().

Referenced by ssl3_md5().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  doxygen 1.6.2