NAME
SpringCard Calypso API :: Implementation of the Card+SAM transaction
COPYRIGHT
(c) 2008 PRO ACTIVE SAS - See LICENCE.txt for licence information
AUTHOR
Johann Dantant / PRO ACTIVE
HISTORY
JDA 21/10/2008 : first public release JDA 15/08/2009 : implemented Revision 3
NAME
CalypsoCancelTransaction
DESCRIPTION
Cancel a transaction (discarding all changes)
INPUTS
CALYPSO_CTX_ST *ctx : library context
RETURNS
CALYPSO_RC : 0 or an error code
SEE ALSO
CalypsoStartTransaction CalypsoStartTransactionEx CalypsoCommitTransaction
NAME
CalypsoCommitTransaction
DESCRIPTION
Commit a transaction
INPUTS
CALYPSO_CTX_ST *ctx : library context BOOL ratify_now : if TRUE, card will ratify its transaction immediately if FALSE, the ratification will happen on the next APDU received by the card (call CalypsoCardSendRatificationFrame)
RETURNS
CALYPSO_RC : 0 or an error code
NOTES
This function performs he following sequence (with the appropriate parameters) - CalypsoSamDigestClose - CalypsoCardCloseSecureSession - CalypsoSamDigestAuthenticate
SEE ALSO
CalypsoStartTransaction CalypsoStartTransactionEx CalypsoCancelTransaction
NAME
CalypsoStartTransaction
DESCRIPTION
Start a transaction between card and SAM (light implemenation) No data will be returned by the card, SAM's KIF will be deduce from card's key_no
INPUTS
CALYPSO_CTX_ST *ctx : library context BOOL *ratified : on output: was the previous session ratified, or not ? BYTE key_no : key number (card side)
RETURNS
CALYPSO_RC : 0 or an error code
NOTES
key_no should be either CALYPSO_KEY_ISSUER, CALYPSO_KEY_LOAD or CALYPSO_KEY_DEBIT See CalypsoStartTransactionEx for implementation details
SEE ALSO
CalypsoStartTransactionEx CalypsoCommitTransaction CalypsoCancelTransaction
NAME
CalypsoStartTransactionEx
DESCRIPTION
Start a transaction between card and SAM (full implementation)
INPUTS
CALYPSO_CTX_ST *ctx : library context BOOL *ratified : on output: was the previous session ratified, or not ? BYTE key_no : key number (card side) BYTE kif : key identifier (KIF - SAM side) BYTE sfi : short identifier of the file to read (0 if none) BYTE rec_no : record number of the record to read (0 if none) BYTE data[] : buffer to receive record's data CALYPSO_SZ *datasize : in : size of data out : actual length of data returned by the card
RETURNS
CALYPSO_RC : 0 or an error code
NOTES
This function performs he following sequence (with the appropriate parameters) - CalypsoSamSelectDiversifier - CalypsoCardOpenSecureSession1, CalypsoCardOpenSecureSession2 or CalypsoCardOpenSecureSession3 (depending on the revision of the card) - CalypsoSamDigestInit Afterwards, every APDU (in/out) exchanged with the card will be forwarded to the SAM (using CalypsoSamDigestUpdate) until either CalypsoCommitTransaction or CalypsoCancelTransaction is called
SEE ALSO
CalypsoStartTransaction CalypsoCommitTransaction CalypsoCancelTransaction