gnutls_cipher.c File Reference

#include "gnutls_int.h"
#include "gnutls_errors.h"
#include "gnutls_cipher.h"
#include "gnutls_algorithms.h"
#include "gnutls_hash_int.h"
#include "gnutls_cipher_int.h"
#include "debug.h"
#include "gnutls_num.h"
#include "gnutls_datum.h"
#include "gnutls_kx.h"
#include "gnutls_record.h"
#include "gnutls_constate.h"
#include <gc.h>

Include dependency graph for gnutls_cipher.c:

Go to the source code of this file.

Functions

int MHD_gtls_encrypt (MHD_gtls_session_t session, const opaque *headers, size_t headers_size, const opaque *data, size_t data_size, opaque *ciphertext, size_t ciphertext_size, content_type_t type, int random_pad)
int MHD_gtls_decrypt (MHD_gtls_session_t session, opaque *ciphertext, size_t ciphertext_size, uint8_t *data, size_t max_data_size, content_type_t type)
static mac_hd_t mac_init (enum MHD_GNUTLS_HashAlgorithm mac, opaque *secret, int secret_size, int ver)
static void mac_deinit (mac_hd_t td, opaque *res, int ver)
static int calc_enc_length (MHD_gtls_session_t session, int data_size, int hash_size, uint8_t *pad, int random_pad, cipher_type_t block_algo, uint16_t blocksize)
int MHD_gtls_compressed2ciphertext (MHD_gtls_session_t session, opaque *cipher_data, int cipher_size, MHD_gnutls_datum_t compressed, content_type_t _type, int random_pad)
int MHD_gtls_ciphertext2compressed (MHD_gtls_session_t session, opaque *compress_data, int compress_size, MHD_gnutls_datum_t ciphertext, uint8_t type)


Function Documentation

static int calc_enc_length ( MHD_gtls_session_t  session,
int  data_size,
int  hash_size,
uint8_t *  pad,
int  random_pad,
cipher_type_t  block_algo,
uint16_t  blocksize 
) [inline, static]

static void mac_deinit ( mac_hd_t  td,
opaque res,
int  ver 
) [inline, static]

Definition at line 128 of file gnutls_cipher.c.

References MHD_gnutls_mac_deinit_ssl3(), MHD_gnutls_MHD_hmac_deinit(), and MHD_GNUTLS_PROTOCOL_SSL3.

Referenced by MHD_gtls_ciphertext2compressed(), and MHD_gtls_compressed2ciphertext().

Here is the call graph for this function:

Here is the caller graph for this function:

static mac_hd_t mac_init ( enum MHD_GNUTLS_HashAlgorithm  mac,
opaque secret,
int  secret_size,
int  ver 
) [inline, static]

Definition at line 107 of file gnutls_cipher.c.

References GNUTLS_MAC_FAILED, MHD_gnutls_mac_init_ssl3(), MHD_GNUTLS_MAC_NULL, MHD_GNUTLS_PROTOCOL_SSL3, and MHD_gtls_MHD_hmac_init().

Referenced by MHD_gtls_ciphertext2compressed(), and MHD_gtls_compressed2ciphertext().

Here is the call graph for this function:

Here is the caller graph for this function:

int MHD_gtls_ciphertext2compressed ( MHD_gtls_session_t  session,
opaque compress_data,
int  compress_size,
MHD_gnutls_datum_t  ciphertext,
uint8_t  type 
)

int MHD_gtls_compressed2ciphertext ( MHD_gtls_session_t  session,
opaque cipher_data,
int  cipher_size,
MHD_gnutls_datum_t  compressed,
content_type_t  _type,
int  random_pad 
)

int MHD_gtls_decrypt ( MHD_gtls_session_t  session,
opaque ciphertext,
size_t  ciphertext_size,
uint8_t *  data,
size_t  max_data_size,
content_type_t  type 
)

Definition at line 89 of file gnutls_cipher.c.

References MHD_gnutls_datum_t::data, MHD_gtls_ciphertext2compressed(), and MHD_gnutls_datum_t::size.

Referenced by MHD_gtls_recv_int().

Here is the call graph for this function:

Here is the caller graph for this function:

int MHD_gtls_encrypt ( MHD_gtls_session_t  session,
const opaque headers,
size_t  headers_size,
const opaque data,
size_t  data_size,
opaque ciphertext,
size_t  ciphertext_size,
content_type_t  type,
int  random_pad 
)

Definition at line 49 of file gnutls_cipher.c.

References MHD_gnutls_datum_t::data, MHD__gnutls_free_datum, MHD_gnutls_assert, MHD_gtls_compressed2ciphertext(), MHD_gtls_write_uint16(), and MHD_gnutls_datum_t::size.

Referenced by MHD_gtls_send_int().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Fri Feb 27 18:33:11 2009 for GNU libmicrohttpd by  doxygen 1.5.7.1