]>
Commit | Line | Data |
---|---|---|
9206d3b0 | 1 | //Data elements for EMV transactions. |
9206d3b0 | 2 | #ifndef __EMVDATAELS_H |
3 | #define __EMVDATAELS_H | |
7dcd37fc | 4 | |
5 | #include <stdint.h> | |
6 | ||
9206d3b0 | 7 | //Known AIDs |
8 | extern const uint8_t AID_VISA[5]; | |
9 | extern const uint8_t AID_VISA_DB[7] ; | |
10 | extern const uint8_t AID_VISA_C[8] ; | |
11 | extern const uint8_t AID_VISA_D[8] ; | |
12 | extern const uint8_t AID_VISA_E[7] ; | |
13 | extern const uint8_t AID_VISA_I[7] ; | |
14 | extern const uint8_t AID_VISA_P[7] ; | |
15 | extern const uint8_t AID_VISA_ATM[8]; | |
16 | extern const uint8_t AID_MASTERCARD[7]; | |
17 | extern const uint8_t AID_MAESTRO[7]; | |
18 | extern const uint8_t AID_MAESTRO_UK[7]; | |
19 | extern const uint8_t AID_MAESTRO_TEST[5]; | |
20 | extern const uint8_t AID_SELF_SERVICE[6]; | |
21 | extern const uint8_t AID_AMEX[5]; | |
22 | extern const uint8_t AID_EXPRESSPAY[]; | |
23 | extern const uint8_t AID_LINK[7]; | |
24 | extern const uint8_t AID_ALIAS[7]; | |
25 | ||
26 | //Master data file for PSE | |
27 | extern const uint8_t DF_PSE[]; | |
28 | ||
29 | typedef struct{ | |
30 | uint8_t tag[2]; | |
31 | char description[255]; | |
7dcd37fc | 32 | } tagdescription; |
9206d3b0 | 33 | |
34 | extern const tagdescription EMV_TAG_LIST[62]; //SW1 return values | |
35 | extern const uint8_t SW1_RESPONSE_BYTES[]; | |
36 | extern const uint8_t SW1_WRONG_LENGTH[] ; | |
37 | extern const uint8_t SW12_OK[]; | |
38 | extern const uint8_t SW12_NOT_SUPPORTED[] ; | |
39 | extern const uint8_t SW12_NOT_FOUND[]; | |
40 | extern const uint8_t SW12_COND_NOT_SAT[]; | |
41 | extern const uint8_t PIN_BLOCKED[] ; | |
42 | extern const uint8_t PIN_BLOCKED2[] ; | |
43 | extern const uint8_t PIN_WRONG[] ; | |
44 | ||
45 | //AIP bitmasks details | |
46 | #define AIP_CHIP_SUPPORTED 0x80 | |
47 | #define AIP_MSR_SUPPORTED 0x40 | |
48 | ||
49 | #define AIP_SDA_SUPPORTED 0x40 | |
50 | #define AIP_DDA_SUPPORTED 0x20 | |
51 | #define AIP_CARDHOLDER_VERIFICATION 0x10 | |
52 | #define AIP_TERMINAL_RISK 0x08 | |
53 | #define AIP_ISSUER_AUTH 0x04 | |
54 | #define AIP_CDA_SUPPORTED 0x01 | |
55 | ||
56 | //human readable error messages | |
57 | //file structure, read from AFL | |
58 | #endif //__EMVDATAELS_H |