Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
Public Member Functions | List of all members
keyple::card::calypso::CmdCardCloseSession Class Referencefinal

#include <CmdCardCloseSession.h>

Inheritance diagram for keyple::card::calypso::CmdCardCloseSession:
Inheritance graph
[legend]
Collaboration diagram for keyple::card::calypso::CmdCardCloseSession:
Collaboration graph
[legend]

Public Member Functions

 CmdCardCloseSession (const std::shared_ptr< CalypsoCard > calypsoCard, const bool ratificationAsked, const std::vector< uint8_t > terminalSessionSignature)
 
 CmdCardCloseSession (const std::shared_ptr< CalypsoCard > calypsoCard)
 
bool isSessionBufferUsed () const override
 
CmdCardCloseSessionsetApduResponse (const std::shared_ptr< ApduResponseApi > apduResponse) override
 
const std::vector< uint8_t > & getSignatureLo () const
 
const std::vector< uint8_t > & getPostponedData () const
 
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable () const override
 
- Public Member Functions inherited from keyple::card::calypso::AbstractCardCommand
 AbstractCardCommand (const CalypsoCardCommand &commandRef)
 
const CalypsoCardCommandgetCommandRef () const override
 
const CalypsoApduCommandException buildCommandException (const std::type_info &exceptionClass, const std::string &message, const CardCommand &commandRef, const int statusWord) const final
 
void checkStatus () override
 
- Public Member Functions inherited from keyple::card::calypso::AbstractApduCommand
 AbstractApduCommand (const CardCommand &commandRef)
 
virtual void addSubName (const std::string &subName) final
 
virtual const std::string & getName () const final
 
virtual void setApduRequest (const std::shared_ptr< ApduRequestAdapter > apduRequest) final
 
virtual const std::shared_ptr< ApduRequestAdaptergetApduRequest () const final
 
virtual const std::shared_ptr< ApduResponseApi > getApduResponse () const final
 
virtual bool isSuccessful () const final
 
virtual const std::string getStatusInformation () const final
 

Additional Inherited Members

- Static Public Attributes inherited from keyple::card::calypso::AbstractApduCommand
static const std::map< const int, const std::shared_ptr< StatusProperties > > STATUS_TABLE
 

Detailed Description

(package-private)
Builds the Close Secure Session APDU command.

Since
2.0.1

Definition at line 46 of file CmdCardCloseSession.h.

Constructor & Destructor Documentation

◆ CmdCardCloseSession() [1/2]

keyple::card::calypso::CmdCardCloseSession::CmdCardCloseSession ( const std::shared_ptr< CalypsoCard >  calypsoCard,
const bool  ratificationAsked,
const std::vector< uint8_t >  terminalSessionSignature 
)

(package-private)
Instantiates a new CmdCardCloseSession depending on the product type of the card.

Parameters
calypsoCardThe CalypsoCard.
ratificationAskedthe ratification asked.
terminalSessionSignaturethe sam half session signature.
Exceptions
IllegalArgumentExceptionIf the signature is null or has a wrong length
IllegalArgumentExceptionIf the command is inconsistent
Since
2.0.1

Definition at line 40 of file CmdCardCloseSession.cpp.

◆ CmdCardCloseSession() [2/2]

keyple::card::calypso::CmdCardCloseSession::CmdCardCloseSession ( const std::shared_ptr< CalypsoCard >  calypsoCard)

(package-private)
Instantiates a new CmdCardCloseSession based on the product type of the card to generate an abort session command (Close Secure Session with p1 = p2 = lc = 0).

Parameters
calypsoCardThe CalypsoCard.
Since
2.0.1

Definition at line 73 of file CmdCardCloseSession.cpp.

Member Function Documentation

◆ getPostponedData()

const std::vector< uint8_t > & keyple::card::calypso::CmdCardCloseSession::getPostponedData ( ) const

(package-private)
Gets the secure session postponed data (e.g. Sv Signature).

Returns
A 0, 3 or 6-byte array of bytes according to presence of postponed data and the extended mode usage.
Since
2.0.1

Definition at line 160 of file CmdCardCloseSession.cpp.

◆ getSignatureLo()

const std::vector< uint8_t > & keyple::card::calypso::CmdCardCloseSession::getSignatureLo ( ) const

(package-private)
Gets the low part of the session signature.

Returns
A 4 or 8-byte array of bytes according to the extended mode availability.
Since
2.0.1

Definition at line 155 of file CmdCardCloseSession.cpp.

◆ getStatusTable()

const std::map< const int, const std::shared_ptr< StatusProperties > > & keyple::card::calypso::CmdCardCloseSession::getStatusTable ( ) const
overridevirtual

(package-private)
Returns the internal status table

Returns
A not null reference
Since
2.0.1

Since
2.0.1

Reimplemented from keyple::card::calypso::AbstractApduCommand.

Definition at line 189 of file CmdCardCloseSession.cpp.

◆ isSessionBufferUsed()

bool keyple::card::calypso::CmdCardCloseSession::isSessionBufferUsed ( ) const
overridevirtual

(package-private)
Indicates if the session buffer is used when executing this command.Allows the management of the overflow of this buffer.

Returns
True if this command uses the session buffer
Since
2.0.1

Returns
False
Since
2.0.1

Implements keyple::card::calypso::AbstractCardCommand.

Definition at line 88 of file CmdCardCloseSession.cpp.

◆ setApduResponse()

CmdCardCloseSession & keyple::card::calypso::CmdCardCloseSession::setApduResponse ( const std::shared_ptr< ApduResponseApi >  apduResponse)
overridevirtual

(package-private)
Sets the command ApduResponseApi.

Parameters
apduResponseThe APDU response.
Returns
The current instance.
Since
2.0.1
Since
2.0.1

Checks the card response length; the admissible lengths are 0, 4 or 8 bytes.

Since
2.0.1

Reimplemented from keyple::card::calypso::AbstractCardCommand.

Definition at line 93 of file CmdCardCloseSession.cpp.


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