X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/9206d3b0342c5d0a594715eab06f6db232329c8d..d627a2fd8cf0d6c9dc670ed15fdfe1d87949d306:/armsrc/emvdataels.h diff --git a/armsrc/emvdataels.h b/armsrc/emvdataels.h index 6f3b6fde..cb714791 100644 --- a/armsrc/emvdataels.h +++ b/armsrc/emvdataels.h @@ -1,15 +1,23 @@ //Data elements for EMV transactions. -#include #ifndef __EMVDATAELS_H #define __EMVDATAELS_H + +#include + +//Known AIDs +typedef struct { + uint8_t tag[2]; + char description[255]; +} __attribute__((__packed__)) tagdescription_t; + //Known AIDs extern const uint8_t AID_VISA[5]; -extern const uint8_t AID_VISA_DB[7] ; -extern const uint8_t AID_VISA_C[8] ; -extern const uint8_t AID_VISA_D[8] ; -extern const uint8_t AID_VISA_E[7] ; -extern const uint8_t AID_VISA_I[7] ; -extern const uint8_t AID_VISA_P[7] ; +extern const uint8_t AID_VISA_DB[7]; +extern const uint8_t AID_VISA_C[8]; +extern const uint8_t AID_VISA_D[8]; +extern const uint8_t AID_VISA_E[7]; +extern const uint8_t AID_VISA_I[7]; +extern const uint8_t AID_VISA_P[7]; extern const uint8_t AID_VISA_ATM[8]; extern const uint8_t AID_MASTERCARD[7]; extern const uint8_t AID_MAESTRO[7]; @@ -17,28 +25,23 @@ extern const uint8_t AID_MAESTRO_UK[7]; extern const uint8_t AID_MAESTRO_TEST[5]; extern const uint8_t AID_SELF_SERVICE[6]; extern const uint8_t AID_AMEX[5]; -extern const uint8_t AID_EXPRESSPAY[]; +extern const uint8_t AID_EXPRESSPAY[8]; extern const uint8_t AID_LINK[7]; extern const uint8_t AID_ALIAS[7]; //Master data file for PSE -extern const uint8_t DF_PSE[]; - -typedef struct{ - uint8_t tag[2]; - char description[255]; -}tagdescription; +extern const uint8_t DF_PSE[14]; +extern const uint8_t SW1_RESPONSE_BYTES[1]; +extern const uint8_t SW1_WRONG_LENGTH[1]; +extern const uint8_t SW12_OK[2]; +extern const uint8_t SW12_NOT_SUPPORTED[2]; +extern const uint8_t SW12_NOT_FOUND[2]; +extern const uint8_t SW12_COND_NOT_SAT[2]; +extern const uint8_t PIN_BLOCKED[2]; +extern const uint8_t PIN_BLOCKED2[2]; +extern const uint8_t PIN_WRONG[1]; -extern const tagdescription EMV_TAG_LIST[62]; //SW1 return values -extern const uint8_t SW1_RESPONSE_BYTES[]; -extern const uint8_t SW1_WRONG_LENGTH[] ; -extern const uint8_t SW12_OK[]; -extern const uint8_t SW12_NOT_SUPPORTED[] ; -extern const uint8_t SW12_NOT_FOUND[]; -extern const uint8_t SW12_COND_NOT_SAT[]; -extern const uint8_t PIN_BLOCKED[] ; -extern const uint8_t PIN_BLOCKED2[] ; -extern const uint8_t PIN_WRONG[] ; +extern const tagdescription_t EMV_TAG_LIST[62]; //SW1 return values //AIP bitmasks details #define AIP_CHIP_SUPPORTED 0x80