#include <ccid.h>
#include <errno.h>
#include <list.h>
#include <emv.h>
#include <ber.h>
#include "emv-internal.h"
Go to the source code of this file.
Functions | |
void | _emv_sys_error (struct _emv *e) |
void | _emv_ccid_error (struct _emv *e) |
void | _emv_icc_error (struct _emv *e) |
void | _emv_error (struct _emv *e, unsigned int code) |
emv_err_t | emv_error (emv_t e) |
void | _emv_success (struct _emv *e) |
unsigned int | emv_error_type (emv_err_t e) |
unsigned int | emv_error_additional (emv_err_t e) |
static const char * | icc_err_string (uint32_t code) |
static const char * | err_string (uint32_t code) |
const char * | emv_error_string (emv_err_t err) |
Variables | |
struct { | |
uint16_t code | |
const char *const str | |
} | icc_errs [] |
static const char *const | emv_errs [] |
void _emv_ccid_error | ( | struct _emv * | e | ) |
Definition at line 20 of file emv_err.c.
References _emv::e_err, EMV_ERR_CCID, and EMV_ERR_TYPE_SHIFT.
Referenced by _emv_generate_ac(), _emv_get_data(), _emv_get_proc_opts(), _emv_int_authenticate(), _emv_read_record(), _emv_verify(), and do_sel().
void _emv_error | ( | struct _emv * | e, | |
unsigned int | code | |||
) |
Definition at line 32 of file emv_err.c.
References _emv::e_err, EMV_ERR_CODE_MASK, EMV_ERR_EMV, and EMV_ERR_TYPE_SHIFT.
Referenced by add_app(), bop_dtemp(), check_icc_cert(), check_pk_cert(), check_ssa(), composite(), decode_record(), emv_app_aip(), emv_authenticate_dynamic(), emv_authenticate_static_data(), emv_cvm_pin(), get_icc_pk(), get_issuer_pk(), ptc(), verify_dynamic_sig(), and verify_ssa_data().
void _emv_icc_error | ( | struct _emv * | e | ) |
Definition at line 25 of file emv_err.c.
References _emv_sw1(), _emv_sw2(), _emv::e_err, EMV_ERR_ICC, and EMV_ERR_TYPE_SHIFT.
Referenced by _emv_generate_ac(), _emv_get_data(), _emv_get_proc_opts(), _emv_int_authenticate(), _emv_read_record(), _emv_verify(), and do_sel().
void _emv_success | ( | struct _emv * | e | ) |
Definition at line 43 of file emv_err.c.
References _emv::e_err.
Referenced by emv_app_init(), emv_appsel_pse(), and emv_read_app_data().
void _emv_sys_error | ( | struct _emv * | e | ) |
Definition at line 14 of file emv_err.c.
References _emv::e_err, EMV_ERR_CODE_MASK, EMV_ERR_SYSTEM, and EMV_ERR_TYPE_SHIFT.
Referenced by check_icc_cert(), check_pk_cert(), check_ssa(), composite(), decode_record(), emv_read_app_data(), make_icc_pk(), and make_issuer_pk().
Definition at line 38 of file emv_err.c.
References _emv::e_err.
Referenced by set_err().
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().
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().
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().
static const char* err_string | ( | uint32_t | code | ) | [static] |
Definition at line 100 of file emv_err.c.
References emv_errs.
Referenced by emv_error_string().
static const char* icc_err_string | ( | uint32_t | code | ) | [static] |
Definition at line 76 of file emv_err.c.
References icc_errs.
Referenced by emv_error_string().
const char* const emv_errs[] [static] |
{ [ EMV_ERR_SUCCESS ] "Success", [ EMV_ERR_DATA_ELEMENT_NOT_FOUND ] "Data element not found", [ EMV_ERR_BAD_PIN_FORMAT ] "Bad PIN format", [ EMV_ERR_FUNC_NOT_SUPPORTED ] "Function not supported", [ EMV_ERR_KEY_NOT_FOUND ] "Key not found", [ EMV_ERR_KEY_SIZE_MISMATCH ] "Key size mismatch", [ EMV_ERR_RSA_RECOVERY ] "RSA Recovery failed on message", [ EMV_ERR_CERTIFICATE ] "Invalid issuer public key certificate", [ EMV_ERR_SSA_SIGNATURE ] "Invald SSA data signature", [ EMV_ERR_BAD_PIN ] "Wrong PIN", [ EMV_ERR_BER_DECODE ] "Malformed BER TLV data", [ EMV_ERR_APP_NOT_SELECTED ] "No application selected", }
Definition at line 85 of file emv_err.c.
Referenced by err_string().
struct { ... } icc_errs[] [static] |
Referenced by icc_err_string().
const char* const str |
Definition at line 60 of file emv_err.c.
Referenced by cp_log(), cp_xfr_data(), cp_xfr_str(), and set_err().