include/emv.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define EMV_AIP_LEN   2
#define EMV_RID_LEN   5
#define EMV_AID_LEN   11
#define EMV_DATA_BINARY   0x0
#define EMV_DATA_TEXT   0x1
#define EMV_DATA_INT   0x2
#define EMV_DATA_BCD   0x3
#define EMV_DATA_DATE   0x4
#define EMV_ERR_SYSTEM   0x0
#define EMV_ERR_CCID   0x1
#define EMV_ERR_ICC   0x2
#define EMV_ERR_EMV   0x3
#define EMV_ERR_SUCCESS   0x00
#define EMV_ERR_DATA_ELEMENT_NOT_FOUND   0x01
#define EMV_ERR_BAD_PIN_FORMAT   0x02
#define EMV_ERR_FUNC_NOT_SUPPORTED   0x03
#define EMV_ERR_KEY_NOT_FOUND   0x04
#define EMV_ERR_KEY_SIZE_MISMATCH   0x05
#define EMV_ERR_RSA_RECOVERY   0x06
#define EMV_ERR_CERTIFICATE   0x07
#define EMV_ERR_SSA_SIGNATURE   0x08
#define EMV_ERR_BAD_PIN   0x09
#define EMV_ERR_BER_DECODE   0x0a
#define EMV_ERR_APP_NOT_SELECTED   0x0b
#define EMV_AC_AAC   0x00
#define EMV_AC_TC   0x40
#define EMV_AC_ARQC   0x80
#define EMV_AC_CDA   0x10
#define EMV_AIP_CDA   0x01
#define EMV_AIP_ISS   0x04
#define EMV_AIP_TRM   0x08
#define EMV_AIP_CVM   0x10
#define EMV_AIP_DDA   0x20
#define EMV_AIP_SDA   0x40
#define EMV_AUC1_DOMESTIC_CASH   (1<<7)
#define EMV_AUC1_INT_CASH   (1<<6)
#define EMV_AUC1_DOMESTIC_GOODS   (1<<5)
#define EMV_AUC1_INT_GOODS   (1<<4)
#define EMV_AUC1_DOMESTIC_SERVICES   (1<<3)
#define EMV_AUC1_INT_SERVICES   (1<<2)
#define EMV_AUC1_ATM   (1<<1)
#define EMV_AUC1_NON_ATM_TERMINALS   (1<<0)
#define EMV_AUC2_DOMESTIC_CASHBACK   (1<<7)
#define EMV_AUC2_INT_CASHBACK   (1<<6)
#define EMV_TAG_MAGSTRIP_TRACK2   0x0057
#define EMV_TAG_PAN   0x005a
#define EMV_TAG_RECORD   0x0070
#define EMV_TAG_CDOL1   0x008c
#define EMV_TAG_CDOL2   0x008d
#define EMV_TAG_CVM_LIST   0x008e
#define EMV_TAG_CA_PK_INDEX   0x008f
#define EMV_TAG_ISS_PK_CERT   0x0090
#define EMV_TAG_ISS_PK_R   0x0092
#define EMV_TAG_SSA_DATA   0x0093
#define EMV_TAG_CARDHOLDER_NAME   0x5f20
#define EMV_TAG_DATE_EXP   0x5f24
#define EMV_TAG_DATE_EFF   0x5f25
#define EMV_TAG_ISSUER_COUNTRY   0x5f28
#define EMV_TAG_SERVICE_CODE   0x5f30
#define EMV_TAG_PAN_SEQ   0x5f34
#define EMV_TAG_USAGE_CONTROL   0x9f07
#define EMV_TAG_APP_VER   0x9f08
#define EMV_TAG_IAC_DEFAULT   0x9f0d
#define EMV_TAG_IAC_DENY   0x9f0e
#define EMV_TAG_IAC_ONLINE   0x9f0f
#define EMV_TAG_MAGSTRIP_TRACK1   0x9f1f
#define EMV_TAG_ISS_PK_EXP   0x9f32
#define EMV_TAG_CURRENCY_EXP   0x9f44
#define EMV_TAG_ICC_PK_CERT   0x9f46
#define EMV_TAG_ICC_PK_EXP   0x9f47
#define EMV_TAG_ICC_PK_R   0x9f48
#define EMV_TAG_DDOL   0x9f49
#define EMV_TAG_SDA_TAG_LIST   0x9f4a
#define EMV_TAG_UNPREDICTABLE_NUMBER   0x9f37

Typedefs

typedef uint32_t emv_err_t
typedef struct _emvemv_t
typedef struct _emv_appemv_app_t
typedef uint8_t emv_aip_t [EMV_AIP_LEN]
typedef struct _emv_dataemv_data_t
typedef uint8_t emv_rid_t [EMV_RID_LEN]
typedef const uint8_t *(* emv_mod_cb_t )(void *priv, unsigned int index, size_t *len)
typedef const uint8_t *(* emv_exp_cb_t )(void *priv, unsigned int index, size_t *len)
typedef int(* emv_dol_cb_t )(uint16_t tag, uint8_t *ptr, size_t len, void *priv)

Functions

_public emv_t emv_init (chipcard_t cc)
_public void emv_fini (emv_t e)
_public emv_err_t emv_error (emv_t e)
_public unsigned int emv_error_type (emv_err_t e)
_public unsigned int emv_error_additional (emv_err_t e)
_public const char * emv_error_string (emv_err_t err)
_public emv_app_t emv_current_app (emv_t e)
_public int emv_appsel_pse (emv_t e)
_public emv_app_t emv_appsel_pse_first (emv_t e)
_public emv_app_t emv_appsel_pse_next (emv_t e, emv_app_t app)
_public int emv_app_select_pse (emv_t e, emv_app_t app)
_public int emv_app_select_aid (emv_t e, const uint8_t *aid, size_t len)
_public int emv_app_select_aid_next (emv_t e, const uint8_t *aid, size_t len)
_public void emv_app_delete (emv_app_t a)
_public void emv_app_rid (emv_app_t a, emv_rid_t ret)
_public void emv_app_aid (emv_app_t a, uint8_t *ret, size_t *len)
_public const char * emv_app_label (emv_app_t a)
_public const char * emv_app_pname (emv_app_t a)
_public uint8_t emv_app_prio (emv_app_t a)
_public int emv_app_confirm (emv_app_t a)
_public int emv_app_init (emv_t e)
_public int emv_app_aip (emv_t e, emv_aip_t aip)
_public int emv_read_app_data (emv_t e)
_public emv_data_t emv_retrieve_data (emv_t e, uint16_t id)
_public emv_data_temv_retrieve_records (emv_t e, unsigned int *nmemb)
_public emv_data_temv_data_children (emv_data_t d, unsigned int *nmemb)
_public const uint8_t * emv_data (emv_data_t d, size_t *len)
_public int emv_data_int (emv_data_t d)
_public int emv_data_sda (emv_data_t d)
_public unsigned int emv_data_type (emv_data_t d)
_public uint16_t emv_data_tag (emv_data_t d)
_public const char * emv_data_tag_label (emv_data_t d)
_public int emv_authenticate_static_data (emv_t e, emv_mod_cb_t mod, emv_exp_cb_t exp, void *priv)
_public int emv_sda_ok (emv_t e)
_public int emv_authenticate_dynamic (emv_t e, emv_mod_cb_t mod, emv_exp_cb_t exp, void *priv)
_public int emv_dda_ok (emv_t e)
_public int emv_cvm_pin (emv_t e, const char *pin)
_public int emv_pin_try_counter (emv_t e)
_public int emv_trm_last_online_atc (emv_t e)
_public int emv_trm_atc (emv_t e)
_public uint8_t * emv_construct_dol (emv_dol_cb_t cbfn, const uint8_t *ptr, size_t len, size_t *ret_len, void *priv)
_public const uint8_t * emv_generate_ac (emv_t e, uint8_t ref, const uint8_t *tx, uint8_t len, size_t *rlen)

Define Documentation

#define EMV_AC_AAC   0x00

Definition at line 121 of file emv.h.

#define EMV_AC_ARQC   0x80

Definition at line 123 of file emv.h.

#define EMV_AC_CDA   0x10

Definition at line 124 of file emv.h.

#define EMV_AC_TC   0x40

Definition at line 122 of file emv.h.

#define EMV_AID_LEN   11

Definition at line 11 of file emv.h.

Referenced by app_cmp(), bop_adfname(), and cp_app_aid().

#define EMV_AIP_CDA   0x01

Definition at line 127 of file emv.h.

Referenced by emv_app_init().

#define EMV_AIP_CVM   0x10

Definition at line 130 of file emv.h.

Referenced by emv_app_init().

#define EMV_AIP_DDA   0x20

Definition at line 131 of file emv.h.

Referenced by emv_app_init(), and emv_authenticate_dynamic().

#define EMV_AIP_ISS   0x04

Definition at line 128 of file emv.h.

Referenced by emv_app_init().

#define EMV_AIP_LEN   2

Definition at line 9 of file emv.h.

#define EMV_AIP_SDA   0x40

Definition at line 132 of file emv.h.

Referenced by emv_app_init(), and emv_authenticate_static_data().

#define EMV_AIP_TRM   0x08

Definition at line 129 of file emv.h.

Referenced by emv_app_init().

#define EMV_AUC1_ATM   (1<<1)

Definition at line 141 of file emv.h.

#define EMV_AUC1_DOMESTIC_CASH   (1<<7)

Definition at line 135 of file emv.h.

#define EMV_AUC1_DOMESTIC_GOODS   (1<<5)

Definition at line 137 of file emv.h.

#define EMV_AUC1_DOMESTIC_SERVICES   (1<<3)

Definition at line 139 of file emv.h.

#define EMV_AUC1_INT_CASH   (1<<6)

Definition at line 136 of file emv.h.

#define EMV_AUC1_INT_GOODS   (1<<4)

Definition at line 138 of file emv.h.

#define EMV_AUC1_INT_SERVICES   (1<<2)

Definition at line 140 of file emv.h.

#define EMV_AUC1_NON_ATM_TERMINALS   (1<<0)

Definition at line 142 of file emv.h.

#define EMV_AUC2_DOMESTIC_CASHBACK   (1<<7)

Definition at line 144 of file emv.h.

#define EMV_AUC2_INT_CASHBACK   (1<<6)

Definition at line 145 of file emv.h.

#define EMV_DATA_BCD   0x3

Definition at line 16 of file emv.h.

Referenced by cp_data_repr().

#define EMV_DATA_BINARY   0x0

Definition at line 13 of file emv.h.

Referenced by cp_data_repr().

#define EMV_DATA_DATE   0x4

Definition at line 17 of file emv.h.

Referenced by cp_data_repr().

#define EMV_DATA_INT   0x2

Definition at line 15 of file emv.h.

Referenced by cp_data_repr(), and emv_data_int().

#define EMV_DATA_TEXT   0x1

Definition at line 14 of file emv.h.

Referenced by cp_data_repr().

#define EMV_ERR_APP_NOT_SELECTED   0x0b

Definition at line 34 of file emv.h.

Referenced by emv_app_aip().

#define EMV_ERR_BAD_PIN   0x09

Definition at line 32 of file emv.h.

Referenced by emv_cvm_pin().

#define EMV_ERR_BAD_PIN_FORMAT   0x02

Definition at line 25 of file emv.h.

Referenced by emv_cvm_pin().

#define EMV_ERR_BER_DECODE   0x0a

Definition at line 33 of file emv.h.

Referenced by composite(), decode_record(), and verify_dynamic_sig().

#define EMV_ERR_CCID   0x1

Definition at line 20 of file emv.h.

Referenced by _emv_ccid_error(), emv_error_string(), and set_err().

#define EMV_ERR_CERTIFICATE   0x07

Definition at line 30 of file emv.h.

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

#define EMV_ERR_DATA_ELEMENT_NOT_FOUND   0x01

Definition at line 24 of file emv.h.

Referenced by add_app(), bop_dtemp(), emv_authenticate_dynamic(), emv_authenticate_static_data(), and ptc().

#define EMV_ERR_EMV   0x3

Definition at line 22 of file emv.h.

Referenced by _emv_error(), and emv_error_string().

#define EMV_ERR_FUNC_NOT_SUPPORTED   0x03

Definition at line 26 of file emv.h.

Referenced by emv_authenticate_dynamic(), and emv_authenticate_static_data().

#define EMV_ERR_ICC   0x2

Definition at line 21 of file emv.h.

Referenced by _emv_icc_error(), and emv_error_string().

#define EMV_ERR_KEY_NOT_FOUND   0x04

Definition at line 27 of file emv.h.

Referenced by emv_authenticate_dynamic(), and emv_authenticate_static_data().

#define EMV_ERR_KEY_SIZE_MISMATCH   0x05

Definition at line 28 of file emv.h.

Referenced by get_icc_pk(), and get_issuer_pk().

#define EMV_ERR_RSA_RECOVERY   0x06

Definition at line 29 of file emv.h.

Referenced by get_icc_pk(), get_issuer_pk(), and verify_ssa_data().

#define EMV_ERR_SSA_SIGNATURE   0x08

Definition at line 31 of file emv.h.

Referenced by check_ssa(), and verify_ssa_data().

#define EMV_ERR_SUCCESS   0x00

Definition at line 23 of file emv.h.

#define EMV_ERR_SYSTEM   0x0

Definition at line 19 of file emv.h.

Referenced by _emv_sys_error(), emv_error_string(), and set_err().

#define EMV_RID_LEN   5

Definition at line 10 of file emv.h.

Referenced by app_cmp(), bop_adfname(), cp_app_rid(), and emv_app_rid().

#define EMV_TAG_APP_VER   0x9f08

Definition at line 165 of file emv.h.

#define EMV_TAG_CA_PK_INDEX   0x008f

Definition at line 154 of file emv.h.

Referenced by get_required_data().

#define EMV_TAG_CARDHOLDER_NAME   0x5f20

Definition at line 158 of file emv.h.

#define EMV_TAG_CDOL1   0x008c

Definition at line 151 of file emv.h.

#define EMV_TAG_CDOL2   0x008d

Definition at line 152 of file emv.h.

#define EMV_TAG_CURRENCY_EXP   0x9f44

Definition at line 171 of file emv.h.

#define EMV_TAG_CVM_LIST   0x008e

Definition at line 153 of file emv.h.

#define EMV_TAG_DATE_EFF   0x5f25

Definition at line 160 of file emv.h.

#define EMV_TAG_DATE_EXP   0x5f24

Definition at line 159 of file emv.h.

#define EMV_TAG_DDOL   0x9f49

Definition at line 175 of file emv.h.

Referenced by get_required_data().

#define EMV_TAG_IAC_DEFAULT   0x9f0d

Definition at line 166 of file emv.h.

#define EMV_TAG_IAC_DENY   0x9f0e

Definition at line 167 of file emv.h.

#define EMV_TAG_IAC_ONLINE   0x9f0f

Definition at line 168 of file emv.h.

#define EMV_TAG_ICC_PK_CERT   0x9f46

Definition at line 172 of file emv.h.

Referenced by get_required_data().

#define EMV_TAG_ICC_PK_EXP   0x9f47

Definition at line 173 of file emv.h.

Referenced by get_required_data().

#define EMV_TAG_ICC_PK_R   0x9f48

Definition at line 174 of file emv.h.

Referenced by get_required_data().

#define EMV_TAG_ISS_PK_CERT   0x0090

Definition at line 155 of file emv.h.

Referenced by get_required_data().

#define EMV_TAG_ISS_PK_EXP   0x9f32

Definition at line 170 of file emv.h.

Referenced by get_required_data().

#define EMV_TAG_ISS_PK_R   0x0092

Definition at line 156 of file emv.h.

Referenced by get_required_data().

#define EMV_TAG_ISSUER_COUNTRY   0x5f28

Definition at line 161 of file emv.h.

#define EMV_TAG_MAGSTRIP_TRACK1   0x9f1f

Definition at line 169 of file emv.h.

#define EMV_TAG_MAGSTRIP_TRACK2   0x0057

Definition at line 148 of file emv.h.

#define EMV_TAG_PAN   0x005a

Definition at line 149 of file emv.h.

Referenced by get_required_data().

#define EMV_TAG_PAN_SEQ   0x5f34

Definition at line 163 of file emv.h.

#define EMV_TAG_RECORD   0x0070

Definition at line 150 of file emv.h.

Referenced by decode_record().

#define EMV_TAG_SDA_TAG_LIST   0x9f4a

Definition at line 176 of file emv.h.

#define EMV_TAG_SERVICE_CODE   0x5f30

Definition at line 162 of file emv.h.

#define EMV_TAG_SSA_DATA   0x0093

Definition at line 157 of file emv.h.

Referenced by get_required_data().

#define EMV_TAG_UNPREDICTABLE_NUMBER   0x9f37

Definition at line 178 of file emv.h.

Referenced by dol_cb().

#define EMV_TAG_USAGE_CONTROL   0x9f07

Definition at line 164 of file emv.h.


Typedef Documentation

typedef uint8_t emv_aip_t[EMV_AIP_LEN]

Definition at line 39 of file emv.h.

typedef struct _emv_app* emv_app_t

Definition at line 38 of file emv.h.

typedef struct _emv_data* emv_data_t

Definition at line 40 of file emv.h.

typedef int(* emv_dol_cb_t)(uint16_t tag, uint8_t *ptr, size_t len, void *priv)

Definition at line 46 of file emv.h.

typedef uint32_t emv_err_t

Definition at line 35 of file emv.h.

typedef const uint8_t*(* emv_exp_cb_t)(void *priv, unsigned int index, size_t *len)

Definition at line 44 of file emv.h.

typedef const uint8_t*(* emv_mod_cb_t)(void *priv, unsigned int index, size_t *len)

Definition at line 42 of file emv.h.

typedef uint8_t emv_rid_t[EMV_RID_LEN]

Definition at line 41 of file emv.h.

typedef struct _emv* emv_t

Definition at line 37 of file emv.h.


Function Documentation

_public void emv_app_aid ( emv_app_t  a,
uint8_t *  ret,
size_t *  len 
)

Definition at line 111 of file emv_appsel.c.

References _emv_app::a_id, and _emv_app::a_id_sz.

Referenced by app_cmp(), and cp_app_aid().

Here is the caller graph for this function:

_public int emv_app_aip ( emv_t  e,
emv_aip_t  aip 
)

Definition at line 75 of file emv_init.c.

References _emv_error(), _emv::e_aip, _emv::e_app, and EMV_ERR_APP_NOT_SELECTED.

Referenced by cp_init().

Here is the call graph for this function:

Here is the caller graph for this function:

_public int emv_app_confirm ( emv_app_t  a  ) 

Definition at line 134 of file emv_appsel.c.

References _emv_app::a_prio.

Referenced by cp_app_confirm().

Here is the caller graph for this function:

_public void emv_app_delete ( emv_app_t  a  ) 

Definition at line 177 of file emv_appsel.c.

References _emv_app::a_list, and list_del().

Referenced by cp_app_dealloc(), and select_app().

Here is the call graph for this function:

Here is the caller graph for this function:

_public int emv_app_init ( emv_t  e  ) 

Definition at line 51 of file emv_init.c.

References _emv_success(), _emv::e_aip, EMV_AIP_CDA, EMV_AIP_CVM, EMV_AIP_DDA, EMV_AIP_ISS, EMV_AIP_SDA, EMV_AIP_TRM, and get_aip().

Referenced by cp_init(), and do_emv_stuff().

Here is the call graph for this function:

Here is the caller graph for this function:

_public const char* emv_app_label ( emv_app_t  a  ) 

Definition at line 117 of file emv_appsel.c.

References _emv_app::a_name.

Referenced by cp_app_label().

Here is the caller graph for this function:

_public const char* emv_app_pname ( emv_app_t  a  ) 

Definition at line 122 of file emv_appsel.c.

References _emv_app::a_name, and _emv_app::a_pname.

Referenced by cp_app_pname(), and select_app().

Here is the caller graph for this function:

_public uint8_t emv_app_prio ( emv_app_t  a  ) 

Definition at line 129 of file emv_appsel.c.

References _emv_app::a_prio.

Referenced by cp_app_prio().

Here is the caller graph for this function:

_public void emv_app_rid ( emv_app_t  a,
emv_rid_t  ret 
)

Definition at line 106 of file emv_appsel.c.

References _emv_app::a_id, and EMV_RID_LEN.

Referenced by app_cmp(), and cp_app_rid().

Here is the caller graph for this function:

_public int emv_app_select_aid ( emv_t  e,
const uint8_t *  aid,
size_t  len 
)

Definition at line 239 of file emv_appsel.c.

References _emv_select(), and set_app().

Referenced by cp_select_aid(), and select_app().

Here is the call graph for this function:

Here is the caller graph for this function:

_public int emv_app_select_aid_next ( emv_t  e,
const uint8_t *  aid,
size_t  len 
)

Definition at line 246 of file emv_appsel.c.

References _emv_select_next(), and set_app().

Referenced by cp_select_aid_next(), and select_app().

Here is the call graph for this function:

Here is the caller graph for this function:

_public int emv_app_select_pse ( emv_t  e,
emv_app_t  app 
)

Definition at line 232 of file emv_appsel.c.

References _emv_select(), _emv_app::a_id, _emv_app::a_id_sz, and set_app().

Referenced by cp_select_pse(), and select_app().

Here is the call graph for this function:

Here is the caller graph for this function:

_public int emv_appsel_pse ( emv_t  e  ) 

Definition at line 139 of file emv_appsel.c.

References _emv_read_record(), _emv_select(), _emv_success(), _emv_app::a_list, add_app(), _emv::e_apps, list_del(), and list_for_each_entry_safe.

Referenced by cp_appsel_pse(), and select_app().

Here is the call graph for this function:

Here is the caller graph for this function:

_public emv_app_t emv_appsel_pse_first ( emv_t  e  ) 

Definition at line 165 of file emv_appsel.c.

References _emv_app::a_list, _emv::e_apps, list_entry, and list_head::next.

Referenced by app_list(), and select_app().

Here is the caller graph for this function:

_public emv_app_t emv_appsel_pse_next ( emv_t  e,
emv_app_t  app 
)

Definition at line 170 of file emv_appsel.c.

References _emv_app::a_list, _emv::e_apps, list_entry, and list_head::next.

Referenced by app_list(), and select_app().

Here is the caller graph for this function:

_public int emv_authenticate_dynamic ( emv_t  e,
emv_mod_cb_t  mod,
emv_exp_cb_t  exp,
void *  priv 
)
_public int emv_authenticate_static_data ( emv_t  e,
emv_mod_cb_t  mod,
emv_exp_cb_t  exp,
void *  priv 
)
_public 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:

_public 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:

_public int emv_cvm_pin ( emv_t  e,
const char *  pin 
)

Definition at line 47 of file emv_cvm.c.

References _emv_error(), _emv_pin2pb(), _emv_sw1(), _emv_verify(), EMV_ERR_BAD_PIN, EMV_ERR_BAD_PIN_FORMAT, and ptc().

Referenced by cp_cvm_pin(), and do_emv_stuff().

Here is the call graph for this function:

Here is the caller graph for this function:

_public const uint8_t* emv_data ( emv_data_t  d,
size_t *  len 
)

Definition at line 194 of file emv_data.c.

References _emv_data::d_data, and _emv_data::d_len.

Referenced by cp_data_repr(), and cp_data_value().

Here is the caller graph for this function:

_public emv_data_t* emv_data_children ( emv_data_t  d,
unsigned int *  nmemb 
)

Definition at line 182 of file emv_data.c.

References _emv_data::d_elem, and _emv_data::d_nmemb.

Referenced by cp_data_children().

Here is the caller graph for this function:

_public int emv_data_int ( emv_data_t  d  ) 

Definition at line 215 of file emv_data.c.

References _emv_data::d_data, _emv_data::d_len, _emv_data::d_tag, EMV_DATA_INT, EMV_DATA_TYPE_MASK, and _emv_tag::t_type.

Referenced by cp_data_repr(), and get_required_data().

Here is the caller graph for this function:

_public int emv_data_sda ( emv_data_t  d  ) 

Definition at line 231 of file emv_data.c.

References _emv_data::d_flags, and EMV_DATA_SDA.

Referenced by cp_data_sda().

Here is the caller graph for this function:

_public uint16_t emv_data_tag ( emv_data_t  d  ) 

Definition at line 205 of file emv_data.c.

References _emv_data::d_id.

Referenced by cp_data_tag(), and data_dict().

Here is the caller graph for this function:

_public const char* emv_data_tag_label ( emv_data_t  d  ) 

Definition at line 210 of file emv_data.c.

References _emv_data::d_tag, and _emv_tag::t_label.

Referenced by cp_data_tag_label().

Here is the caller graph for this function:

_public unsigned int emv_data_type ( emv_data_t  d  ) 

Definition at line 200 of file emv_data.c.

References _emv_data::d_tag, EMV_DATA_TYPE_MASK, and _emv_tag::t_type.

Referenced by cp_data_repr(), and cp_data_type().

Here is the caller graph for this function:

_public int emv_dda_ok ( emv_t  e  ) 

Definition at line 540 of file emv_dda.c.

References _emv::e_dda_ok.

_public emv_err_t emv_error ( emv_t  e  ) 

Definition at line 38 of file emv_err.c.

References _emv::e_err.

Referenced by set_err().

Here is the caller graph for this function:

_public unsigned int emv_error_additional ( emv_err_t  e  ) 

Definition at line 53 of file emv_err.c.

References EMV_ERR_CODE_MASK.

Referenced by set_err().

Here is the caller graph for this function:

_public const char* emv_error_string ( emv_err_t  err  ) 

Definition at line 107 of file emv_err.c.

References EMV_ERR_CCID, EMV_ERR_CODE_MASK, EMV_ERR_EMV, EMV_ERR_ICC, EMV_ERR_SYSTEM, EMV_ERR_TYPE_SHIFT, err_string(), and icc_err_string().

Referenced by set_err().

Here is the call graph for this function:

Here is the caller graph for this function:

_public unsigned int emv_error_type ( emv_err_t  e  ) 

Definition at line 48 of file emv_err.c.

References EMV_ERR_TYPE_SHIFT.

Referenced by set_err().

Here is the caller graph for this function:

_public 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:

_public 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:

_public 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:

_public int emv_pin_try_counter ( emv_t  e  ) 
_public int emv_read_app_data ( emv_t  e  ) 
_public emv_data_t emv_retrieve_data ( emv_t  e,
uint16_t  id 
)

Definition at line 177 of file emv_data.c.

References _emv_db::db_elem, _emv_db::db_nmemb, _emv::e_db, and find_data().

Here is the call graph for this function:

_public emv_data_t* emv_retrieve_records ( emv_t  e,
unsigned int *  nmemb 
)

Definition at line 188 of file emv_data.c.

References _emv_db::db_numrec, _emv_db::db_rec, and _emv::e_db.

Referenced by cp_read_app_data().

Here is the caller graph for this function:

_public int emv_sda_ok ( emv_t  e  ) 

Definition at line 355 of file emv_sda.c.

References _emv::e_sda_ok.

_public int emv_trm_atc ( emv_t  e  ) 
_public int emv_trm_last_online_atc ( emv_t  e  ) 
Generated on Sun Jan 2 08:34:43 2011 for ccid-utils by  doxygen 1.6.3