#include <ccid.h>
#include <emv.h>
#include <stdio.h>
#include "ca_pubkeys.h"
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 [] |
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().
static int app_supported | ( | emv_app_t | a | ) | [static] |
Definition at line 43 of file emvtool.c.
References app_cmp().
Referenced by select_app().
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().
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().
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().
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().
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().
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().
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().
size_t exp_len |
Definition at line 115 of file emvtool.c.
Referenced by get_ca_key().
size_t mod_len |
Definition at line 115 of file emvtool.c.
Referenced by get_ca_key().