src/emv_err.c File Reference

#include <ccid.h>
#include <errno.h>
#include <list.h>
#include <emv.h>
#include <ber.h>
#include "emv-internal.h"
Include dependency graph for emv_err.c:

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 []

Function Documentation

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().

Here is the caller graph for this function:

void _emv_error ( struct _emv e,
unsigned int  code 
)
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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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:

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:

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:

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:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:


Variable Documentation

uint16_t code

Definition at line 59 of file emv_err.c.

Referenced by set_err().

const char* const emv_errs[] [static]
Initial value:
 {
        [ 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().

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