|
Keypop Calypso Card C++ API - 2.2.0
Component of the Keypop C++ API
|
Extends the IsoSmartCard interface of the "Keypop Reader API" to provide additional functionality specific to Calypso cards. More...
#include <keypop/calypso/card/card/CalypsoCard.hpp>


Public Types | |
| enum class | ProductType { PRIME_REVISION_1 , PRIME_REVISION_2 , PRIME_REVISION_3 , LIGHT , BASIC , UNKNOWN } |
| All Calypso Card products supported by this API. More... | |
Public Member Functions | |
| virtual const ProductType & | getProductType () const =0 |
| Gets the card product type. More... | |
| virtual bool | isHce () const =0 |
| Indicates if the card is a Calypso HCE (Host Card Emulation) . More... | |
| virtual bool | isDfInvalidated () const =0 |
| Tells if the current DF is invalidated or not. More... | |
| virtual const std::vector< uint8_t > & | getDfName () const =0 |
| Gets the DF name as an array of bytes. More... | |
| virtual const std::vector< uint8_t > | getApplicationSerialNumber () const =0 |
| Gets the Calypso application serial number as an array of bytes. More... | |
| virtual const std::vector< uint8_t > & | getStartupInfoRawData () const =0 |
| Gets the raw Calypso startup information. More... | |
| virtual uint8_t | getPlatform () const =0 |
| Gets the platform identification byte which is the reference of the chip. More... | |
| virtual uint8_t | getApplicationType () const =0 |
| Gets the Application Type byte which determines the Calypso product type and various options. More... | |
| virtual uint8_t | getApplicationSubtype () const =0 |
| Gets the Application Subtype that provides a reference to the file structure of the Calypso DF. More... | |
| virtual uint8_t | getSoftwareIssuer () const =0 |
| Gets the Software Issuer byte that indicates the entity responsible for the software of the selected application. More... | |
| virtual uint8_t | getSoftwareVersion () const =0 |
| Gets the Software Version field that may be set to any fixed value by the Software Issuer of the Calypso application. More... | |
| virtual uint8_t | getSoftwareRevision () const =0 |
| Gets the Software Revision field that may be set to any fixed value by the Software Issuer of the Calypso application. More... | |
| virtual uint8_t | getSessionModification () const =0 |
| Gets the session modification byte from the startup info structure. More... | |
| virtual const std::vector< uint8_t > | getTraceabilityInformation () const =0 |
| Gets the traceability information of the product. More... | |
| virtual const std::vector< std::uint8_t > & | getCardPublicKey () const =0 |
| Returns the card public key. More... | |
| virtual const std::vector< std::uint8_t > & | getCardCertificate () const =0 |
| Returns the card certificate. More... | |
| virtual const std::vector< std::uint8_t > & | getCaCertificate () const =0 |
| Returns the CA certificate. More... | |
| virtual const std::shared_ptr< DirectoryHeader > | getDirectoryHeader () const =0 |
| Returns the metadata of the current DF. More... | |
| virtual const std::shared_ptr< ElementaryFile > | getFileBySfi (const uint8_t sfi) const =0 |
| Returns a reference to the ElementaryFile that has the provided SFI. More... | |
| virtual const std::shared_ptr< ElementaryFile > | getFileByLid (const uint16_t lid) const =0 |
| Returns a reference to the ElementaryFile that has the provided LID value. More... | |
| virtual const std::vector< std::shared_ptr< ElementaryFile > > & | getFiles () const =0 |
| Returns a reference to the set of all known Elementary Files contains inside the current DF. More... | |
| virtual bool | isDfRatified () const =0 |
| Tells if the last session with this card has been ratified or not. More... | |
| virtual int | getTransactionCounter () const =0 |
| Returns the transaction counter value provided in the output data of the last successful "Open Secure Session" command. More... | |
| virtual bool | isPkiModeSupported () const =0 |
| Indicates whether the Public Key Authentication is supported or not (since rev 3.3). More... | |
| virtual bool | isExtendedModeSupported () const =0 |
| Indicates whether the Extended Mode is supported or not (since rev 3.2). More... | |
| virtual bool | isRatificationOnDeselectSupported () const =0 |
| Indicates if the ratification is done on deselect (ratification command not necessary). More... | |
| virtual bool | isPinFeatureAvailable () const =0 |
| Indicates whether the card has the Calypso PIN feature. More... | |
| virtual bool | isPinBlocked () const =0 |
| Indicates if the PIN is blocked. More... | |
| virtual int | getPinAttemptRemaining () const =0 |
| Gives the number of erroneous PIN presentations remaining before blocking. More... | |
| virtual bool | isSvFeatureAvailable () const =0 |
| Indicates whether the card has the Calypso Stored Value feature. More... | |
| virtual int | getSvBalance () const =0 |
| Gets the current SV balance value. More... | |
| virtual int | getSvLastTNum () const =0 |
| Gets the last SV transaction number. More... | |
| virtual const std::shared_ptr< SvLoadLogRecord > | getSvLoadLogRecord ()=0 |
| Gets a reference to the last SvLoadLogRecord. More... | |
| virtual const std::shared_ptr< SvDebitLogRecord > | getSvDebitLogLastRecord ()=0 |
| Gets a reference to the last SvDebitLogRecord. More... | |
| virtual const std::vector< std::shared_ptr< SvDebitLogRecord > > | getSvDebitLogAllRecords () const =0 |
| Gets list of references to the SvDebitLogRecord read from the card. More... | |
| operator std::string () | |
Extends the IsoSmartCard interface of the "Keypop Reader API" to provide additional functionality specific to Calypso cards.
An instance of
is obtained by casting the IsoSmartCard object from the selection process defined by the "Keypop Reader API".
It is a dynamic view of the card's content, regularly updated from the selection stage to the end of the transaction.
The various information contained in CalypsoCard includes:
Definition at line 58 of file CalypsoCard.hpp.
|
strong |
All Calypso Card products supported by this API.
Definition at line 65 of file CalypsoCard.hpp.
|
pure virtual |
Gets the Calypso application serial number as an array of bytes.
|
pure virtual |
Gets the Application Subtype that provides a reference to the file structure of the Calypso DF.
|
pure virtual |
Gets the Application Type byte which determines the Calypso product type and various options.
|
pure virtual |
Returns the CA certificate.
|
pure virtual |
Returns the card certificate.
|
pure virtual |
Returns the card public key.
|
pure virtual |
Gets the DF name as an array of bytes.
The DF name is the name of the application DF as defined in ISO/IEC 7816-4.
It also corresponds to the complete representation of the target covered by the AID value provided in the selection command.
The AID selects the application by specifying all or part of the targeted DF Name (5 bytes minimum).
|
pure virtual |
Returns the metadata of the current DF.
|
pure virtual |
Returns a reference to the ElementaryFile that has the provided LID value.
Note that if a secure session is actually running, then the object contains all session modifications, which can be canceled if the secure session fails.
| lid | The LID to search. |
|
pure virtual |
Returns a reference to the ElementaryFile that has the provided SFI.
Note that if a secure session is actually running, then the object contains all session modifications, which can be canceled if the secure session fails.
| sfi | The SFI to search. |
|
pure virtual |
Returns a reference to the set of all known Elementary Files contains inside the current DF.
Note that if a secure session is actually running, then the set contains all session modifications, which can be canceled if the secure session fails.
|
pure virtual |
Gives the number of erroneous PIN presentations remaining before blocking.
| IllegalStateException | If the PIN has not been checked. |
|
pure virtual |
Gets the platform identification byte which is the reference of the chip.
|
pure virtual |
Gets the card product type.
|
pure virtual |
Gets the session modification byte from the startup info structure.
Depending on the type of card, the session modification byte indicates the maximum number of bytes that can be modified or the number of possible write commands in a session.
|
pure virtual |
Gets the Software Issuer byte that indicates the entity responsible for the software of the selected application.
|
pure virtual |
Gets the Software Revision field that may be set to any fixed value by the Software Issuer of the Calypso application.
|
pure virtual |
Gets the Software Version field that may be set to any fixed value by the Software Issuer of the Calypso application.
|
pure virtual |
Gets the raw Calypso startup information.
|
pure virtual |
Gets the current SV balance value.
| IllegalStateException | If no SV Get command has been executed. |
|
pure virtual |
Gets list of references to the SvDebitLogRecord read from the card.
|
pure virtual |
Gets a reference to the last SvDebitLogRecord.
|
pure virtual |
Gets the last SV transaction number.
| IllegalStateException | If no SV Get command has been executed. |
|
pure virtual |
Gets a reference to the last SvLoadLogRecord.
|
pure virtual |
Gets the traceability information of the product.
The returned array contains the software issuer ID and the discretionary data.
|
pure virtual |
Returns the transaction counter value provided in the output data of the last successful "Open Secure Session" command.
Please note that there are other commands that can decrement the original card counter (e.g. Change Key, Change/Verify PIN, SV Debit/Undebit/Reload). For these othe commands, the counter value returned by this method will not be updated.
| IllegalStateException | If no session has been opened. |
|
pure virtual |
Tells if the current DF is invalidated or not.
The invalidation status is determined either from the response to the Select Application command or from the response to a Select File (DF) command.
For a PRIME_REVISION_3 card, a 6283h status word is returned in response to the Select Application command when the corresponding DF is invalidated.
For older Calypso cards it may be necessary to execute a Select File command in order to determine the invalidation status.
|
pure virtual |
Tells if the last session with this card has been ratified or not.
| IllegalStateException | If no session has been opened. |
|
pure virtual |
Indicates whether the Extended Mode is supported or not (since rev 3.2).
This boolean is initially the result of the interpretation of the application type byte but may be updated after the secure session is opened. Indeed, depending on the type of key used, the extended mode functionalities may not be available (non-AES keys) and this information is provided by the card in response to the "Open Secure Session" command.
|
pure virtual |
Indicates if the card is a Calypso HCE (Host Card Emulation) .
|
pure virtual |
Indicates if the PIN is blocked.
The maximum number of incorrect PIN submissions has been reached.
| IllegalStateException | If the PIN has not been checked. |
|
pure virtual |
Indicates whether the card has the Calypso PIN feature.
This boolean is interpreted from the Application Type byte
|
pure virtual |
Indicates whether the Public Key Authentication is supported or not (since rev 3.3).
This boolean is interpreted from the Application Type byte
|
pure virtual |
Indicates if the ratification is done on deselect (ratification command not necessary).
This boolean is interpreted from the Application Type byte
|
pure virtual |
Indicates whether the card has the Calypso Stored Value feature.
This boolean is interpreted from the Application Type byte
|
inline |