AT-NFC 2.1 (win) AT-NFC kernel set

Data Structures | Macros | Typedefs | Functions
emv_data.h File Reference
`#include <emv_platform_set_align.h>`
`#include <emv_platform_restore_align.h>`

Go to the source code of this file.

## Data Structures
struct | tag_KER_TLV
| TLV container structure. More...
struct | tag_KER_OFFLINE_PIN_DATA
| offline PIN cvm related data structure More...

## Macros
#define | KER_FIND_LAST 0x01
#define | KER_CVM_FAIL 0x00
#define | KER_CVM_SKIP 0x01
#define | KER_CVM_NO_CVM 0x02
#define | KER_CVM_ONLINE_PIN 0x03
#define | KER_CVM_PLAIN_PIN 0x04
#define | KER_CVM_ENC_PIN 0x05
#define | KER_CVM_PLAIN_PIN_SIG 0x06
#define | KER_CVM_ENC_PIN_SIG 0x07
#define | KER_CVM_SIGNATURE 0x08
#define | KER_CVM_CUSTOM 0xFF
#define | KER_CVM_RES_OK 0x00
#define | KER_CVM_RES_FAIL 0x01
#define | KER_CVM_RES_BYPASS 0x02
#define | KER_CVM_RES_UNKNOWN 0x03
#define | KER_CVM_RES_UNSUPP 0x04
#define | KER_CVM_RES_UNREC 0x05
#define | KER_CVM_RES_CANCEL 0x06
#define | KER_CVM_RES_HW_ERR 0x07
#define | KER_REFFERAL_RES_NA 0x00
#define | KER_REFFERAL_RES_APPROVE 0x01
#define | KER_REFFERAL_RES_DECLINE 0x02
#define | KER_TAA_MODE_CHECK_OFFLINE_DECL 0x00
#define | KER_TAA_MODE_FINAL_BEFORE_CAA 0x01
#define | KER_TAA_MODE_UNABLE_TO_GO_ONLINE 0x02
#define | KER_TRAN_FL_SIGNATURE_CVM_REQUESTED 0x0001
#define | KER_TRAN_FL_APP_VER_MISMATCH 0x0002
#define | KER_TRAN_FL_TAA_OFFLINE_DECLINED 0x0004
#define | KER_TRAN_FL_TAA_ONLINE_REQUEST 0x0008
#define | KER_TRAN_FL_TAA_OFFLINE_APPROVE 0x0010
#define | KER_TRAN_FL_CAA_OFFLINE_DECLINED 0x0020
#define | KER_TRAN_FL_CAA_ONLINE_REQUEST 0x0040
#define | KER_TRAN_FL_CAA_OFFLINE_APPROVED 0x0080
#define | KER_TRAN_FL_TAA_DEFAULT_APPROVE 0x0100
#define | KER_TRAN_FL_TAA_DEFAULT_DECLINED 0x0200
#define | KER_TRAN_FL_CAA_SKIP_GAC2_BY_XDA 0x0400
#define | KER_TRAN_FL_ADVICE_REQUIRED 0x1000
#define | KER_TRAN_FL_SERVICE_NOT_ALLOWWED 0x2000
#define | KER_TRAN_FL_PIN_TRY_EXCEEDED 0x4000
#define | KER_TRAN_FL_ISS_AUTH_FAILED 0x8000
#define | KER_TRAN_ERR_FL_PAN_MISMATCH 0x0001
#define | KER_TRAN_ERR_FL_EXP_DATE_MISMATCH 0x0002
#define | KER_TRAN_ERR_FL_INV_AUTH_DATA 0x0004
#define | KER_TRAN_ERR_FL_PDOL_MAND_AMOUNT_MISSED 0x0008
#define | KER_TRAN_STAT_APP_SELECTED 0x0001
#define | KER_TRAN_STAT_PROC_INITIATED 0x0002
#define | KER_TRAN_STAT_READ_DATA 0x0004
#define | KER_TRAN_STAT_OFFLINE_AUTH 0x0008
#define | KER_TRAN_STAT_PROC_RESTR 0x0010
#define | KER_TRAN_STAT_CV 0x0020
#define | KER_TRAN_STAT_RISK_MANAGEMENT 0x0040
#define | KER_TRAN_STAT_CAA 0x0080
#define | KER_TRAN_STAT_ONLINE 0x0100

## Typedefs
typedef struct tag_KER_TLV | KER_TLV
| TLV container structure. More...
typedef struct tag_KER_OFFLINE_PIN_DATA | KER_OFFLINE_PIN_DATA
| offline PIN cvm related data structure More...
typedef struct tag_KER_TRAN | KER_TRAN
| Kernel internal transaction data structure. More...

## Functions
KER_RES KER_API | kerContTlvCreateByTag (KER_CTX_PARAM const KER_BYTE *pbtTag, KER_BYTE btTagLen, const KER_BYTE *pbtValue, KER_INT16U usValueLen, KER_TLV **ppTlv)
| Creates TLV container structure from provided tag & value. More...
KER_RES KER_API | kerContTlvCreateByTLV (KER_CTX_PARAM const KER_BYTE *pbtTlv, KER_INT16U usTlvLen, KER_TLV **ppTlv)
| Creates TLV container structure from provided TLV buffer. More...
KER_RES KER_API | kerContTlvListAddByTLV (KER_CTX_PARAM const KER_BYTE *pbtTlv, KER_INT16U usTlvLen, KER_TLV **ppTlv)
| Creates TLV container structure from provided TLV buffer and addes it to provided TLV List. More...
KER_BOOL KER_API | kerContTlvRelease (KER_CTX_PARAM KER_TLV *pTlv)
| Releases TLV container structure. More...
KER_BOOL KER_API | kerContTlvListRelease (KER_CTX_PARAM KER_TLV *pTlvList)
| Releases TLV container structure list. More...
KER_BOOL KER_API | kerContTlvListPush (KER_CTX_PARAM KER_TLV **ppTlv, KER_TLV *pTlvToPush)
| Add TLV container structure to list (to the start of list) More...
KER_BOOL KER_API | kerContTlvListPushLast (KER_CTX_PARAM KER_TLV **ppTlv, KER_TLV *pTlvToPush)
| Add TLV container structure to list (to the end of list) More...
KER_TLV *KER_API | kerContTlvListGetNext (KER_CTX_PARAM KER_TLV *pTlvListEntry)
| Returns next TLV container structure in list. More...
KER_BOOL KER_API | kerContTlvListPop (KER_CTX_PARAM KER_TLV **ppTlv, KER_TLV *pTlvToPop)
| Pop TLV container structure from list. More...
KER_BOOL KER_API | kerTranRelease (KER_CTX_PARAM KER_TRAN *pTran)
| Releases Transaction container structure. More...
KER_BOOL KER_API | kerTranGetDataByTag (KER_CTX_PARAM KER_TRAN *pTran, const KER_BYTE *pbtTag, KER_BYTE btTagLen, KER_BYTE *pbtData, KER_INT16U *pusDataLen, KER_INT16U usDataMax)
| Obtain tag value from transaction data structure. More...
KER_BOOL KER_API | kerTranGetCustDataByTag (KER_CTX_PARAM KER_TRAN *pTran, const KER_BYTE *pbtTag, KER_BYTE btTagLen, KER_BYTE *pbtData, KER_INT16U *pusDataLen, KER_INT16U usDataMax)
| Obtain tag value from to transaction data structure (from unrecognized/unexpected ICC data) More...
KER_BOOL KER_API | kerTranGetDataByDOL (KER_CTX_PARAM KER_TRAN *pTran, const KER_BYTE *pbtDol, KER_INT16U usDolLen, KER_BYTE *pbtData, KER_INT16U *pusDataLen, KER_INT16U usDataMax)
| Obtain data according to the DOL provided. More...
KER_BOOL KER_API | kerTranGetCardData (KER_CTX_PARAM KER_TRAN *pTran, const KER_BYTE *pbtTag, KER_BYTE btTagLen, KER_BYTE *pbtData, KER_INT16U *pusDataLen, KER_INT16U usDataMax)
| Obtain tag value from card by GET_DATA command. More...
KER_BOOL KER_API | kerTranGetScriptResults (KER_CTX_PARAM KER_TRAN *pTran, KER_BYTE *pbtData, KER_INT16U *pusDataLen, KER_INT16U usDataMax)
| Obtain data as tlv buffer by provided tag list. More...
KER_BOOL KER_API | kerTranGetScriptResultsRef (KER_CTX_PARAM KER_TRAN *pTran, KER_INT16U usScriptIndex, KER_BYTE *pbtData, KER_INT16U *pusDataLen, KER_INT16U usDataMax)
| Obtain data as tlv buffer by provided tag list. More...
KER_INT16U KER_API | kerTranGetFlags (KER_CTX_PARAM KER_TRAN *pTran)
| Obtain some specific conditions as bitmask. More...
KER_INT16U KER_API | kerTranGetErrorFlags (KER_CTX_PARAM KER_TRAN *pTran)
| Obtain some specific errors as bitmask. More...
KER_INT16U KER_API | kerTranGetStatus (KER_CTX_PARAM KER_TRAN *pTran)
| Obtain transaction progress status. More...

## Detailed Description

KERNEL API for data manipulation

## Macro Definition Documentation

## ◆ KER_CVM_CUSTOM

#define KER_CVM_CUSTOM 0xFF

custom requested

## ◆ KER_CVM_ENC_PIN

#define KER_CVM_ENC_PIN 0x05

enciphered offline pin requested

## ◆ KER_CVM_ENC_PIN_SIG

#define KER_CVM_ENC_PIN_SIG 0x07

enciphered offline pin & signature requested

## ◆ KER_CVM_FAIL

#define KER_CVM_FAIL 0x00

cardholder verification failed

## ◆ KER_CVM_NO_CVM

#define KER_CVM_NO_CVM 0x02

no cardholder verification required

## ◆ KER_CVM_ONLINE_PIN

#define KER_CVM_ONLINE_PIN 0x03

online pin requested

## ◆ KER_CVM_PLAIN_PIN

#define KER_CVM_PLAIN_PIN 0x04

plaintext offline pin requested

## ◆ KER_CVM_PLAIN_PIN_SIG

#define KER_CVM_PLAIN_PIN_SIG 0x06

plaintext offline pin & signature requested

## ◆ KER_CVM_RES_BYPASS

#define KER_CVM_RES_BYPASS 0x02

cvm bypassed

## ◆ KER_CVM_RES_CANCEL

#define KER_CVM_RES_CANCEL 0x06

cvm cancelled by user or timeout occured

## ◆ KER_CVM_RES_FAIL

#define KER_CVM_RES_FAIL 0x01

failure (not verified)

## ◆ KER_CVM_RES_HW_ERR

#define KER_CVM_RES_HW_ERR 0x07

cvm hw error

## ◆ KER_CVM_RES_OK

#define KER_CVM_RES_OK 0x00

success

## ◆ KER_CVM_RES_UNKNOWN

#define KER_CVM_RES_UNKNOWN 0x03

cvm result defined on issuer side

## ◆ KER_CVM_RES_UNREC

#define KER_CVM_RES_UNREC 0x05

cvm unrecognised

## ◆ KER_CVM_RES_UNSUPP

#define KER_CVM_RES_UNSUPP 0x04

cvm unsupported

## ◆ KER_CVM_SIGNATURE

#define KER_CVM_SIGNATURE 0x08

cardholder signature requested

## ◆ KER_CVM_SKIP

#define KER_CVM_SKIP 0x01

skip cardholder verification

## ◆ KER_FIND_LAST

#define KER_FIND_LAST 0x01

find last entry

## ◆ KER_REFFERAL_RES_APPROVE

#define KER_REFFERAL_RES_APPROVE 0x01

approve requested

## ◆ KER_REFFERAL_RES_DECLINE

#define KER_REFFERAL_RES_DECLINE 0x02

decline requested

## ◆ KER_REFFERAL_RES_NA

#define KER_REFFERAL_RES_NA 0x00

n/a (referral not supported)

## ◆ KER_TAA_MODE_CHECK_OFFLINE_DECL

#define KER_TAA_MODE_CHECK_OFFLINE_DECL 0x00

check for offline decline (at any stage before CAA or if GAC1 xda failed)

## ◆ KER_TAA_MODE_FINAL_BEFORE_CAA

#define KER_TAA_MODE_FINAL_BEFORE_CAA 0x01

final TAA before CAA

## ◆ KER_TAA_MODE_UNABLE_TO_GO_ONLINE

#define KER_TAA_MODE_UNABLE_TO_GO_ONLINE 0x02

unable to go online - check against Default IAC/TAC