Amadis

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

Agnos provides a set of EMV core primitives which support EMV transaction flow. These primitives are used by:

  • CT payment applications (see emvco.c as example)

  • CL card processing applications (alias CL kernels)

C Structures

tTransactionalContext (agnos.h)

tADFList (selection.h)

typedef struct {
tByte mNumberOfADF;
tADF mList[MAX_SUPPORTED_ADF];
tBoolean mEliminatedADF[MAX_SUPPORTED_ADF];
tBoolean mCardBlocked;
tBoolean mAnyBlockedApplication;
tByte mSelectionIndex;
} tADFList;

tADF (selection.h)

// AID information - alias ADF - kept in the ICC as per semantic's EMVCo proposal
typedef struct {
	tByte		mADFName[MAX_AID_LENGTH]; 		//0x4F
	tByte		mADFLen;
	tByte		mLabel[MAX_AID_LENGTH]; 		//0x50
	tByte		mLabelLen;
	tByte		mPreferredName[MAX_AID_LENGTH]; //0x9F12
	tByte		mPreferredNameLen;
	tByte		mPriorityIndicator; 			//0x87
	tByte		mLangagePreference[8]; 			//0x5F2D
	tByte		mLangagePreferenceLen;
	tByte		mIssuerCodeTableIndex; 			//0x9F11
	tByte		mRemainingFCI[200]; 			//0xBF0C. May contain Issuer Country Code 5F56 AND/OR Application Selection Flag DF62
	tByte		mRemainingFCILen;
	tByte		mBlocked;
	tByte		mCorrespondingAIDOrderNumber;	// Order of the ADF in the AID list (application supported by terminal)

	// Extension to support PPSE
	tByte		mKernelIdentifier[8];			//0x9F2A
	tByte		mKernelIdentifierLen;
	tByte		mRequestedKernelId;
	tByte		mExtendedSelection[MAX_AID_LENGTH];			//0x9F29
	tByte		mExtendedSelectionLen;
} tADF;

tPSE (selection.h)

typedef struct {
tByte mPSEName[MAX_AID_LENGTH];//0x84
tByte mPSELen;
tByte mSFI;//0x88
tByte mLangagePreference[8];//0x5F2D
tByte mLangagePreferenceLen;
tByte mIssuerCodeTableIndex;//0x9F11
tByte mRemainingFCI[MAX_REMAINING_FCI_LENGTH];//0xBF0C. May contain Issuer Country Code 5F56 AND/OR Application Selection Flag DF62
tByte mRemainingFCILen;
} tPSE;

Callbacks

typedef void (*tGetDataCallback)(tBoolean lastRead, tBoolean *next)

typedef void (*tBuildDOLCallback)(tWord tag, tByte length, tByte *DOLData)

typedef void (*tStateCallback)(tAgnosState currentState, tBoolean *stop, tBoolean *bypass)

Primitives

Names

Comments

agnGetVersionNumber

Provide EMV core engine version

agnOpenSession

Open a CT session to initiate an EMV transaction flow

agnOpenSessionCL

Open a CL session to initiate an EMV transaction flow

agnInititateEMVTransaction

Initiate/Resume an EMV transaction

agnCompleteEMVTransaction

Complete a transaction as per EMVCo definition

agnCloseSession

Close a transaction flow

agnSetAgnosDatabase

agnSetKernelStatus

agnSetEMVTag

agnOverwriteTag

agnRemoveTag

agnGetEMVTag

agnGetAllTags

agnGetDatabase

agnIsEMVTagKnown

agnIsEMVTagPresent

agnIsEMVTagEmpty

agnIsEMVTagNotEmpty

agnSetExitState

agnSetParsingCallback

agnSetStateCallback

agnSetBuilDOLCallback

agnORTVR

OR a specific TVR’s bit to 1

agnORAgnosTVR

OR a specific Agnos TVR’s bit to 1

agnSetAgnosTVR

Set a specific Agnos TVR byte value

  • No labels