Keypop Calypso Crypto Legacy SAM C++ API 0.6.0
Reference Calypso Crypto Legacy SAM API for C++
Public Types | Public Member Functions | List of all members
keypop::calypso::crypto::legacysam::sam::LegacySam Class Referenceabstract

#include <LegacySam.hpp>

Inheritance diagram for keypop::calypso::crypto::legacysam::sam::LegacySam:
Inheritance graph
[legend]
Collaboration diagram for keypop::calypso::crypto::legacysam::sam::LegacySam:
Collaboration graph
[legend]

Public Types

enum class  ProductType {
  SAM_C1 , HSM_C1 , SAM_S1E1 , SAM_S1DX ,
  UNKNOWN
}
 

Public Member Functions

virtual ProductType getProductType () const =0
 
virtual const std::string & getProductInfo () const =0
 
virtual const std::vector< uint8_t > & getSerialNumber () const =0
 
virtual uint8_t getPlatform () const =0
 
virtual uint8_t getApplicationType () const =0
 
virtual uint8_t getApplicationSubType () const =0
 
virtual uint8_t getSoftwareIssuer () const =0
 
virtual uint8_t getSoftwareVersion () const =0
 
virtual uint8_t getSoftwareRevision () const =0
 
virtual std::shared_ptr< int > getCounter (const int counterNumber) const =0
 
virtual const std::map< const int, const int > & getCounters () const =0
 
virtual CounterIncrementAccess getCounterIncrementAccess (const int counterNumber) const =0
 
virtual std::shared_ptr< int > getCounterCeiling (const int counterNumber) const =0
 
virtual const std::map< const int, const int > & getCounterCeilings () const =0
 
virtual KeyParameter getSystemKeyParameter (const SystemKeyType systemKeyType) const =0
 
virtual const std::vector< uint8_t > & getCaCertificate () const =0
 

Detailed Description

Extends the SmartCard interface of the "Keypop Reader API" to provide additional functionality specific to Calypso legacy SAMs.

An instance of

LegacySam

is obtained by casting the SmartCard object from the selection process defined by the "Keypop Reader API".

It is a dynamic view of the SAM's content, regularly updated from the selection stage to the end of the transaction.

Since
0.1.0

Definition at line 43 of file LegacySam.hpp.

Member Enumeration Documentation

◆ ProductType

All Calypso SAM products supported by this API.

Since
0.1.0
Enumerator
SAM_C1 

SAM C1

Since
0.1.0
HSM_C1 

SAM C1 HSM

Since
0.1.0
SAM_S1E1 

SAM S1E1

Since
0.1.0
SAM_S1DX 

SAM S1Dx

Since
0.1.0
UNKNOWN 

Unidentified smart card.

Since
0.1.0

Definition at line 50 of file LegacySam.hpp.

Member Function Documentation

◆ getApplicationSubType()

virtual uint8_t keypop::calypso::crypto::legacysam::sam::LegacySam::getApplicationSubType ( ) const
pure virtual

Returns the application subtype.

Returns
A byte.
Since
0.1.0

◆ getApplicationType()

virtual uint8_t keypop::calypso::crypto::legacysam::sam::LegacySam::getApplicationType ( ) const
pure virtual

Returns the application type.

Returns
A byte.
Since
0.1.0

◆ getCaCertificate()

virtual const std::vector< uint8_t > & keypop::calypso::crypto::legacysam::sam::LegacySam::getCaCertificate ( ) const
pure virtual

Gets the CA certificate retrieved from the SAM as a 384-byte byte array.

Returns
null if the CA certificate is not available.
See also
FreeTransactionManager::prepareGetData(GetDataTag)
Since
0.5.0

◆ getCounter()

virtual std::shared_ptr< int > keypop::calypso::crypto::legacysam::sam::LegacySam::getCounter ( const int  counterNumber) const
pure virtual

Returns the value of a counter.

Parameters
counterNumberThe number of the counter (in range [0..26]).
Returns
Null if the counter value is not set.
Since
0.1.0

◆ getCounterCeiling()

virtual std::shared_ptr< int > keypop::calypso::crypto::legacysam::sam::LegacySam::getCounterCeiling ( const int  counterNumber) const
pure virtual

Returns the value of a counter ceiling.

Parameters
counterNumberThe number of the counter ceiling (in range [0..26]).
Returns
Null if the counter ceiling value is not set.
Since
0.1.0

◆ getCounterCeilings()

virtual const std::map< const int, const int > & keypop::calypso::crypto::legacysam::sam::LegacySam::getCounterCeilings ( ) const
pure virtual

Returns the value of known counter ceilings in a sorted map where

key

is the ceiling number and

value

is the ceiling value.

Returns
A non-null map.
Since
0.1.0

◆ getCounterIncrementAccess()

virtual CounterIncrementAccess keypop::calypso::crypto::legacysam::sam::LegacySam::getCounterIncrementAccess ( const int  counterNumber) const
pure virtual

Returns the counter increment access mode.

Parameters
counterNumberThe number of the counter being checked.
Returns
Null if the counter increment access is unknown.
Since
0.2.0

◆ getCounters()

virtual const std::map< const int, const int > & keypop::calypso::crypto::legacysam::sam::LegacySam::getCounters ( ) const
pure virtual

Returns the value of known counters in a sorted map where

key

is the counter number and

value

is the counter value.

Returns
A non-null map.
Since
0.1.0

◆ getPlatform()

virtual uint8_t keypop::calypso::crypto::legacysam::sam::LegacySam::getPlatform ( ) const
pure virtual

Returns the platform identifier.

Returns
A byte.
Since
0.1.0

◆ getProductInfo()

virtual const std::string & keypop::calypso::crypto::legacysam::sam::LegacySam::getProductInfo ( ) const
pure virtual

Returns a text description of the SAM.

Returns
A non-null string.
Since
0.1.0

◆ getProductType()

virtual ProductType keypop::calypso::crypto::legacysam::sam::LegacySam::getProductType ( ) const
pure virtual

Returns the SAM product type.

Returns
The identified product type.
Since
0.1.0

◆ getSerialNumber()

virtual const std::vector< uint8_t > & keypop::calypso::crypto::legacysam::sam::LegacySam::getSerialNumber ( ) const
pure virtual

Returns the SAM serial number as a byte array.

Returns
A non-null byte array.
Since
0.1.0

◆ getSoftwareIssuer()

virtual uint8_t keypop::calypso::crypto::legacysam::sam::LegacySam::getSoftwareIssuer ( ) const
pure virtual

Returns the software issuer identifier.

Returns
A byte.
Since
0.1.0

◆ getSoftwareRevision()

virtual uint8_t keypop::calypso::crypto::legacysam::sam::LegacySam::getSoftwareRevision ( ) const
pure virtual

Returns the software revision number.

Returns
A byte.
Since
0.1.0

◆ getSoftwareVersion()

virtual uint8_t keypop::calypso::crypto::legacysam::sam::LegacySam::getSoftwareVersion ( ) const
pure virtual

Returns the software version number.

Returns
A byte.
Since
0.1.0

◆ getSystemKeyParameter()

virtual KeyParameter keypop::calypso::crypto::legacysam::sam::LegacySam::getSystemKeyParameter ( const SystemKeyType  systemKeyType) const
pure virtual

Returns the parameters of the system key whose type is provided.

Parameters
systemKeyTypeThe type of system key.
Returns
Null if there is no parameter available for the specified key type.
Since
0.2.0

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