src/emvtool.c File Reference

#include <ccid.h>
#include <emv.h>
#include <stdio.h>
#include "ca_pubkeys.h"
Include dependency graph for emvtool.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  t_app

Functions

static int app_cmp (emv_app_t a, const struct t_app *b)
static int app_supported (emv_app_t a)
static int select_app (emv_t e)
static const uint8_t * get_mod (void *priv, unsigned int idx, size_t *len)
static const uint8_t * get_exp (void *priv, unsigned int idx, size_t *len)
static int trm (emv_t e)
static int do_emv_stuff (chipcard_t cc)
static int found_cci (ccidev_t dev)
int main (int argc, char **argv)

Variables

static struct t_app apps []
struct {
   const uint8_t *   mod
   const uint8_t *   exp
   size_t   mod_len
   size_t   exp_len
ca_keys []

Function Documentation

static int app_cmp ( emv_app_t  a,
const struct t_app b 
) [static]

Definition at line 25 of file emvtool.c.

References t_app::aid, t_app::aid_len, t_app::asi, EMV_AID_LEN, emv_app_aid(), emv_app_rid(), and EMV_RID_LEN.

Referenced by app_supported(), and select_app().

Here is the call graph for this function:

Here is the caller graph for this function:

static int app_supported ( emv_app_t  a  )  [static]

Definition at line 43 of file emvtool.c.

References app_cmp().

Referenced by select_app().

Here is the call graph for this function:

Here is the caller graph for this function:

static int do_emv_stuff ( chipcard_t  cc  )  [static]

Definition at line 149 of file emvtool.c.

References emv_app_init(), emv_authenticate_dynamic(), emv_cvm_pin(), emv_fini(), emv_init(), emv_read_app_data(), get_exp(), get_mod(), select_app(), and trm().

Referenced by found_cci().

Here is the call graph for this function:

Here is the caller graph for this function:

static int found_cci ( ccidev_t  dev  )  [static]

Definition at line 202 of file emvtool.c.

References cci_close(), cci_get_slot(), cci_probe(), CHIPCARD_AUTO_VOLTAGE, chipcard_slot_off(), chipcard_slot_on(), chipcard_wait_for_card(), and do_emv_stuff().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

static const uint8_t* get_exp ( void *  priv,
unsigned int  idx,
size_t *  len 
) [static]

Definition at line 131 of file emvtool.c.

References ca_keys.

Referenced by do_emv_stuff().

Here is the caller graph for this function:

static const uint8_t* get_mod ( void *  priv,
unsigned int  idx,
size_t *  len 
) [static]

Definition at line 123 of file emvtool.c.

References ca_keys.

Referenced by do_emv_stuff().

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Definition at line 236 of file emvtool.c.

References ccid_free_device_list(), ccid_get_device_list(), and found_cci().

Here is the call graph for this function:

static int select_app ( emv_t  e  )  [static]

Definition at line 56 of file emvtool.c.

References t_app::aid, t_app::aid_len, app_cmp(), app_supported(), emv_app_delete(), emv_app_pname(), emv_app_select_aid(), emv_app_select_aid_next(), emv_app_select_pse(), emv_appsel_pse(), emv_appsel_pse_first(), emv_appsel_pse_next(), and emv_current_app().

Referenced by do_emv_stuff().

Here is the call graph for this function:

Here is the caller graph for this function:

static int trm ( emv_t  e  )  [static]

Definition at line 139 of file emvtool.c.

References atc(), emv_trm_atc(), and emv_trm_last_online_atc().

Referenced by do_emv_stuff().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

struct t_app apps[] [static]
Initial value:
 {
        {.aid = (uint8_t *)"\xa0\x00\x00\x00\x03", .aid_len = 5, .asi = 1},
        {.aid = (uint8_t *)"\xa0\x00\x00\x00\x29", .aid_len = 5, .asi = 1},
}

Definition at line 20 of file emvtool.c.

struct { ... } ca_keys[] [static]

Referenced by get_exp(), and get_mod().

const uint8_t * exp

Definition at line 114 of file emvtool.c.

size_t exp_len

Definition at line 115 of file emvtool.c.

Referenced by get_ca_key().

const uint8_t* mod

Definition at line 114 of file emvtool.c.

size_t mod_len

Definition at line 115 of file emvtool.c.

Referenced by get_ca_key().

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