Last change
on this file since 4994 was 4994, checked in by Admin, 13 years ago |
I noticed that monitor encryption is not working on 64bit plattforms due to other sizes of long on this plattform. This patch converts all numeric types like long to portable types like uint32_t. This is not complete yet (only base folder up to r4987, changes thereafter might be incompletely converted). If you encounter problems through this patch please report in forum.
|
File size:
773 bytes
|
Line | |
---|
1 | #define ADDRLEN 4 // Address length in EMM commands
|
---|
2 | #define MAX_PROV 16
|
---|
3 | #define SCT_LEN(sct) (3+((sct[1]&0x0f)<<8)+sct[2])
|
---|
4 | #define MAX_LEN 256
|
---|
5 |
|
---|
6 | //Warning: OK = 0 and ERROR = 1 in csctapi !!!
|
---|
7 | #define SKIPPED 2
|
---|
8 | #define OK 1
|
---|
9 | #define ERROR 0
|
---|
10 |
|
---|
11 | #include "atr.h"
|
---|
12 |
|
---|
13 | #define write_cmd(cmd, data) \
|
---|
14 | { \
|
---|
15 | if (card_write(reader, cmd, data, cta_res, &cta_lr)) return ERROR; \
|
---|
16 | }
|
---|
17 |
|
---|
18 | #define get_atr \
|
---|
19 | unsigned char atr[64]; \
|
---|
20 | uint32_t atr_size; \
|
---|
21 | memset(atr, 0, sizeof(atr)); \
|
---|
22 | ATR_GetRaw(&newatr, atr, &atr_size);
|
---|
23 |
|
---|
24 | #define get_hist \
|
---|
25 | unsigned char hist[64]; \
|
---|
26 | uint32_t hist_size; \
|
---|
27 | ATR_GetHistoricalBytes(&newatr, hist, &hist_size);
|
---|
28 |
|
---|
29 | #define def_resp \
|
---|
30 | unsigned char cta_res[CTA_RES_LEN]; \
|
---|
31 | memset(cta_res, 0, CTA_RES_LEN); \
|
---|
32 | uint16_t cta_lr;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.