Keypop Calypso Card C++ API - 2.1.2
Component of the Keypop C++ API
keypop::calypso::card::transaction::SecureTransactionManager< T > Class Template Referenceabstract

Contains operations common to all card transactions secured by cryptographic algorithms. More...

#include <keypop/calypso/card/transaction/SecureTransactionManager.hpp>

Inheritance diagram for keypop::calypso::card::transaction::SecureTransactionManager< T >:
Collaboration diagram for keypop::calypso::card::transaction::SecureTransactionManager< T >:

Public Member Functions

virtual std::shared_ptr< CardTransactionCryptoExtension > getCryptoExtension ()=0
 Returns the associated CardTransactionCryptoExtension instance. More...
 
virtual T & prepareCloseSecureSession ()=0
 Schedules the execution of a "Close Secure Session" command. More...
 
virtual T & prepareCancelSecureSession ()=0
 Schedules the execution of a special "Close Secure Session" command in order to abort the current secure session. More...
 
- Public Member Functions inherited from keypop::calypso::card::transaction::TransactionManager< T >
virtual T & prepareSelectFile (std::uint16_t lid)=0
 Schedules the execution of a "Select File" command to select an EF by its LID in the current DF. More...
 
virtual T & prepareSelectFile (SelectFileControl selectFileControl)=0
 Schedules the execution of a "Select File" command using a navigation selectFileControl defined by the ISO standard. More...
 
virtual T & prepareGetData (GetDataTag tag)=0
 Schedules the execution of one or more "Get Data" command to retrieve the data indicated by the provided data type. More...
 
virtual T & preparePutData (PutDataTag tag, const std::vector< std::uint8_t > &data)=0
 Schedules the execution of one or more "Put Data" command to inject the provided data associated with the provided data type. More...
 
virtual T & prepareReadRecord (std::uint8_t sfi, int recordNumber)=0
 Schedules the execution of a "Read Records" command to read a single record from the indicated EF. More...
 
virtual T & prepareReadRecords (std::uint8_t sfi, int fromRecordNumber, int toRecordNumber, int recordSize)=0
 Schedules the execution of a "Read Records" command to read one or more records from the indicated EF. More...
 
virtual T & prepareReadRecordsPartially (std::uint8_t sfi, int fromRecordNumber, int toRecordNumber, int offset, int nbBytesToRead)=0
 Schedules the execution of one or multiple "Read Record Multiple" commands to read all or parts of multiple records of the indicated EF. More...
 
virtual T & prepareReadBinary (std::uint8_t sfi, int offset, int nbBytesToRead)=0
 Schedules the execution of one or multiple "Read Binary" commands to read all or part of the indicated "binary" EF. More...
 
virtual T & prepareReadCounter (std::uint8_t sfi, int nbCountersToRead)=0
 Schedules the execution of a "Read Records" command to reads a record of the indicated EF, which should be a "counter" file. More...
 
virtual T & prepareSearchRecords (std::shared_ptr< SearchCommandData > data)=0
 Schedules the execution of a "Search Record Multiple" command to search data in the records of the indicated EF, from a given record to the last record of the file. More...
 
virtual T & prepareCheckPinStatus ()=0
 Schedules the execution of a "Verify Pin" command without PIN presentation in order to get the attempt counter. More...
 
virtual T & prepareAppendRecord (std::uint8_t sfi, const std::vector< std::uint8_t > &recordData)=0
 Schedules the execution of an "Append Record" command to adds the data provided in the indicated "cyclic" file. More...
 
virtual T & prepareUpdateRecord (std::uint8_t sfi, int recordNumber, const std::vector< std::uint8_t > &recordData)=0
 Schedules the execution of an "Update Record" command to overwrites the target file's record contents with the provided data. More...
 
virtual T & prepareWriteRecord (std::uint8_t sfi, int recordNumber, const std::vector< std::uint8_t > &recordData)=0
 Schedules the execution of a "Write Record" command to updates the target file's record contents with the result of a binary OR between the existing data and the provided data. More...
 
virtual T & prepareUpdateBinary (std::uint8_t sfi, int offset, const std::vector< std::uint8_t > &data)=0
 Schedules the execution of one or multiple "Update Binary" command to replace the indicated data of a "binary" file with the new data given from the indicated offset. More...
 
virtual T & prepareWriteBinary (std::uint8_t sfi, int offset, const std::vector< std::uint8_t > &data)=0
 Schedules the execution of one or multiple "Write Binary" commands to write over the indicated data of a "binary" file. More...
 
virtual T & prepareIncreaseCounter (std::uint8_t sfi, int counterNumber, int incValue)=0
 Schedules the execution of an "Increase" command to increase the target counter. More...
 
virtual T & prepareIncreaseCounters (std::uint8_t sfi, const std::map< int, int > &counterNumberToIncValueMap)=0
 Schedules the execution of an "Increase Multiple" command or multiple "Increase" commands to increase multiple target counters at the same time. More...
 
virtual T & prepareDecreaseCounter (std::uint8_t sfi, int counterNumber, int decValue)=0
 Schedules the execution of a "Decrease" command to decrease the target counter. More...
 
virtual T & prepareDecreaseCounters (std::uint8_t sfi, const std::map< int, int > &counterNumberToDecValueMap)=0
 Schedules the execution of a "Decrease Multiple" command or multiple "Decrease" commands to decrease multiple target counters at the same time. More...
 
virtual T & prepareSetCounter (std::uint8_t sfi, int counterNumber, int newValue)=0
 Schedules the execution of an "Increase" or "Decrease" command to set the value of the target counter. More...
 
virtual T & prepareSvReadAllLogs ()=0
 Schedules the execution of "Read Records" commands to read all SV logs. More...
 
virtual T & prepareVerifyPin (const std::vector< std::uint8_t > &pin)=0
 Schedules the execution of a "Verify PIN" command in order to authenticate the cardholder and/or unlock access to certain card files. More...
 
virtual T & prepareChangePin (const std::vector< uint8_t > &newPin)=0
 Schedules the execution of a "Change PIN" command to replace the current PIN with the new value provided. More...
 
virtual T & prepareGenerateAsymmetricKeyPair ()=0
 Schedules the execution of a "Generate Asymmetric Key Pair" command. More...
 
virtual const std::vector< std::vector< std::uint8_t > > & getTransactionAuditData () const =0
 Processes all previously prepared commands and closes the physical channel if requested. More...
 

Detailed Description

template<typename T>
class keypop::calypso::card::transaction::SecureTransactionManager< T >

Contains operations common to all card transactions secured by cryptographic algorithms.

See TransactionManager parent interface for more information and details of others available card operations.

Parameters
<T>The type of the lowest level child object.
Since
2.0.0

Definition at line 36 of file SecureTransactionManager.hpp.

Member Function Documentation

◆ getCryptoExtension()

template<typename T >
virtual std::shared_ptr< CardTransactionCryptoExtension > keypop::calypso::card::transaction::SecureTransactionManager< T >::getCryptoExtension ( )
pure virtual

Returns the associated CardTransactionCryptoExtension instance.

Returns
A non-null CardTransactionCryptoExtension.
Exceptions
IllegalArgumentExceptionIf the provided class is null.
Since
2.0.0

◆ prepareCancelSecureSession()

template<typename T >
virtual T & keypop::calypso::card::transaction::SecureTransactionManager< T >::prepareCancelSecureSession ( )
pure virtual

Schedules the execution of a special "Close Secure Session" command in order to abort the current secure session.

This command will be executed in safe mode and will not raise any exceptions.

Returns
The current instance.
Since
1.6.0

◆ prepareCloseSecureSession()

template<typename T >
virtual T & keypop::calypso::card::transaction::SecureTransactionManager< T >::prepareCloseSecureSession ( )
pure virtual

Schedules the execution of a "Close Secure Session" command.

The ratification mechanism is disabled by default but can be enabled via the SymmetricCryptoSecuritySetting#enableRatificationMechanism() method.

In this case, a ratification command is added after the "Close Secure Session" command when the communication is done in contactless mode.

Returns
The current instance.
Exceptions
IllegalStateExceptionIn the following cases:
  • No secure session is opened and no secure session opening is prepared
  • A secure session closing is already prepared
  • A secure session canceling is prepared
Since
1.6.0

The documentation for this class was generated from the following file: