]> git.zerfleddert.de Git - proxmark3-svn/blame - client/emv/emvcore.h
Add: Emv first part of commands
[proxmark3-svn] / client / emv / emvcore.h
CommitLineData
a2bb2735 1//-----------------------------------------------------------------------------
2// Copyright (C) 2017 Merlok
3//
4// This code is licensed to you under the terms of the GNU GPL, version 2 or,
5// at your option, any later version. See the LICENSE.txt file for the text of
6// the license.
7//-----------------------------------------------------------------------------
3c5fce2b 8// EMV core functionality
a2bb2735 9//-----------------------------------------------------------------------------
10
11#ifndef EMVCORE_H__
12#define EMVCORE_H__
13
14#include <stdio.h>
15#include <stdint.h>
16#include <stdlib.h>
17#include <inttypes.h>
3c5fce2b 18#include <string.h>
a2bb2735 19#include "util.h"
20#include "common.h"
21#include "ui.h"
3c5fce2b
OM
22#include "cmdhf14a.h"
23#include "emv/apduinfo.h"
a2bb2735 24#include "emv/tlv.h"
3c5fce2b 25#include "emv/dol.h"
a2bb2735 26#include "emv/dump.h"
27#include "emv/emv_tags.h"
28
3c5fce2b
OM
29#define APDU_RES_LEN 260
30#define APDU_AID_LEN 50
31
a2bb2735 32extern void TLVPrintFromBuffer(uint8_t *data, int datalen);
3c5fce2b
OM
33extern void TLVPrintFromTLV(struct tlvdb *tlv);
34extern void TLVPrintAIDlistFromSelectTLV(struct tlvdb *tlv);
35
36extern void SetAPDULogging(bool logging);
37
38// search application
39extern int EMVSearchPSE(bool ActivateField, bool LeaveFieldON, bool decodeTLV, struct tlvdb *tlv);
40extern int EMVSearch(bool ActivateField, bool LeaveFieldON, bool decodeTLV, struct tlvdb *tlv);
41extern int EMVSelectPSE(bool ActivateField, bool LeaveFieldON, uint8_t PSENum, uint8_t *Result, size_t MaxResultLen, size_t *ResultLen, uint16_t *sw);
42extern int EMVSelect(bool ActivateField, bool LeaveFieldON, uint8_t *AID, size_t AIDLen, uint8_t *Result, size_t MaxResultLen, size_t *ResultLen, uint16_t *sw, struct tlvdb *tlv);
43// select application
44extern int EMVSelectApplication(struct tlvdb *tlv, uint8_t *AID, size_t *AIDlen);
45// Get Processing Options
46extern int EMVGPO(bool LeaveFieldON, uint8_t *PDOL, size_t PDOLLen, uint8_t *Result, size_t MaxResultLen, size_t *ResultLen, uint16_t *sw, struct tlvdb *tlv);
47extern int EMVReadRecord(bool LeaveFieldON, uint8_t SFI, uint8_t SFIrec, uint8_t *Result, size_t MaxResultLen, size_t *ResultLen, uint16_t *sw, struct tlvdb *tlv);
a2bb2735 48
49#endif
50
51
52
53
Impressum, Datenschutz