src/emv.c File Reference

#include <ccid.h>
#include <list.h>
#include <emv.h>
#include <ber.h>
#include "emv-internal.h"
#include <openssl/sha.h>
#include <openssl/rsa.h>
#include <openssl/engine.h>
#include <gang.h>
#include <mpool.h>
#include <ctype.h>
Include dependency graph for emv.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

uint8_t _emv_sw1 (emv_t e)
uint8_t _emv_sw2 (emv_t e)
int _emsa_pss_decode (const uint8_t *msg, size_t msg_len, const uint8_t *em, size_t em_len)
static uint8_t * construct_dol (emv_dol_cb_t cbfn, const uint8_t *ptr, size_t len, size_t *ret_len, void *priv)
uint8_t * emv_construct_dol (emv_dol_cb_t cbfn, const uint8_t *ptr, size_t len, size_t *ret_len, void *priv)
uint8_t * _emv_construct_dol (emv_dol_cb_t cbfn, const uint8_t *ptr, size_t len, size_t *ret_len, void *priv)
int _emv_pin2pb (const char *pin, emv_pb_t pb)
const uint8_t * emv_generate_ac (emv_t e, uint8_t ref, const uint8_t *tx, uint8_t len, size_t *rlen)
static void do_emv_fini (emv_t e)
emv_app_t emv_current_app (emv_t e)
emv_t emv_init (chipcard_t cc)
void emv_fini (emv_t e)

Function Documentation

int _emsa_pss_decode ( const uint8_t *  msg,
size_t  msg_len,
const uint8_t *  em,
size_t  em_len 
)

Definition at line 25 of file emv.c.

Referenced by check_icc_cert(), check_pk_cert(), and check_ssa().

Here is the caller graph for this function:

uint8_t* _emv_construct_dol ( emv_dol_cb_t  cbfn,
const uint8_t *  ptr,
size_t  len,
size_t *  ret_len,
void *  priv 
)

Definition at line 157 of file emv.c.

References construct_dol().

Referenced by verify_dynamic_sig().

Here is the call graph for this function:

Here is the caller graph for this function:

int _emv_pin2pb ( const char *  pin,
emv_pb_t  pb 
)

Definition at line 163 of file emv.c.

References EMV_PIN_BLOCK_LEN.

uint8_t _emv_sw1 ( emv_t  e  ) 

Definition at line 15 of file emv.c.

References _emv::e_xfr, and xfr_rx_sw1().

Referenced by _emv_icc_error(), and emv_cvm_pin().

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t _emv_sw2 ( emv_t  e  ) 

Definition at line 20 of file emv.c.

References _emv::e_xfr, and xfr_rx_sw2().

Referenced by _emv_icc_error().

Here is the call graph for this function:

Here is the caller graph for this function:

static uint8_t* construct_dol ( emv_dol_cb_t  cbfn,
const uint8_t *  ptr,
size_t  len,
size_t *  ret_len,
void *  priv 
) [static]

Definition at line 83 of file emv.c.

References ber_tag_len(), and find_tag().

Referenced by _emv_construct_dol(), and emv_construct_dol().

Here is the call graph for this function:

Here is the caller graph for this function:

static void do_emv_fini ( emv_t  e  )  [static]

Definition at line 198 of file emv.c.

References _emv_free_applist(), _emv::e_afl, _emv::e_app, _emv::e_ca_pk, _emv::e_data, _emv::e_files, _emv::e_iss_pk, _emv::e_xfr, gang_free(), mpool_free(), and xfr_free().

Referenced by emv_fini(), and emv_init().

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t* emv_construct_dol ( emv_dol_cb_t  cbfn,
const uint8_t *  ptr,
size_t  len,
size_t *  ret_len,
void *  priv 
)

Definition at line 151 of file emv.c.

References construct_dol().

Referenced by do_dol().

Here is the call graph for this function:

Here is the caller graph for this function:

emv_app_t emv_current_app ( emv_t  e  ) 

Definition at line 220 of file emv.c.

References _emv::e_app.

Referenced by select_app(), and set_current().

Here is the caller graph for this function:

void emv_fini ( emv_t  e  ) 

Definition at line 261 of file emv.c.

References do_emv_fini().

Referenced by cp_emv_dealloc(), and do_emv_stuff().

Here is the call graph for this function:

Here is the caller graph for this function:

const uint8_t* emv_generate_ac ( emv_t  e,
uint8_t  ref,
const uint8_t *  tx,
uint8_t  len,
size_t *  rlen 
)

Definition at line 189 of file emv.c.

References _emv_generate_ac(), _emv::e_xfr, and xfr_rx_data().

Referenced by cp_gen_ac().

Here is the call graph for this function:

Here is the caller graph for this function:

emv_t emv_init ( chipcard_t  cc  ) 

Definition at line 225 of file emv.c.

References CHIPCARD_ACTIVE, chipcard_status(), do_emv_fini(), _emv::e_apps, _emv::e_data, _emv::e_dev, _emv::e_files, _emv::e_xfr, gang_new(), INIT_LIST_HEAD, mpool_free(), mpool_new(), and xfr_alloc().

Referenced by cp_emv_init(), and do_emv_stuff().

Here is the call graph for this function:

Here is the caller graph for this function:

Generated on Sun Jan 2 08:35:14 2011 for ccid-utils by  doxygen 1.6.3