Keyple C++  0.9.0
Keyple, an Open Source SDK for Ticketing
Public Member Functions | Static Public Member Functions | List of all members
keyple::calypso::command::po::parser::security::OpenSession10RespPars Class Referencefinal

#include <OpenSession10RespPars.h>

Inherits keyple::calypso::command::po::parser::security::AbstractOpenSessionRespPars.

Public Member Functions

 OpenSession10RespPars (std::shared_ptr< ApduResponse > response, OpenSession10CmdBuild *builder)
 
std::shared_ptr< SecureSessiontoSecureSession (const std::vector< uint8_t > &apduResponseData) override
 
- Public Member Functions inherited from keyple::calypso::command::po::parser::security::AbstractOpenSessionRespPars
 AbstractOpenSessionRespPars (std::shared_ptr< ApduResponse > response, AbstractOpenSessionCmdBuild< AbstractOpenSessionRespPars > *builder, const PoRevision revision)
 
virtual ~AbstractOpenSessionRespPars ()=default
 
std::shared_ptr< AbstractOpenSessionRespParscreate (std::shared_ptr< ApduResponse > response, const PoRevision revision)
 
virtual const std::vector< uint8_t > & getPoChallenge () const
 
virtual int getTransactionCounterValue () const
 
virtual bool wasRatified () const
 
virtual bool isManageSecureSessionAuthorized () const
 
virtual uint8_t getSelectedKif () const
 
virtual uint8_t getSelectedKvc () const
 
virtual const std::vector< uint8_t > & getRecordDataRead () const
 
- Public Member Functions inherited from keyple::calypso::command::po::AbstractPoResponseParser
 AbstractPoResponseParser (std::shared_ptr< ApduResponse > response, AbstractPoCommandBuilder< AbstractPoResponseParser > *builder)
 
 AbstractPoResponseParser (const AbstractPoResponseParser &arp)=default
 
virtual ~AbstractPoResponseParser ()=default
 
virtual AbstractPoCommandBuilder< AbstractPoResponseParser > * getBuilder () const override
 
void checkStatus () const override
 
- Public Member Functions inherited from keyple::core::command::AbstractApduResponseParser
 AbstractApduResponseParser (const std::shared_ptr< ApduResponse > response, AbstractApduCommandBuilder *builder)
 
 AbstractApduResponseParser (const AbstractApduResponseParser &aarp)=default
 
virtual ~AbstractApduResponseParser ()=default
 
void setApduResponse (const std::shared_ptr< ApduResponse > &response)
 
const std::shared_ptr< ApduResponsegetApduResponse () const
 
virtual bool isSuccessful () const
 
std::string getStatusInformation () const
 

Static Public Member Functions

static std::shared_ptr< SecureSessioncreateSecureSession (const std::vector< uint8_t > &apduResponseData)
 

Additional Inherited Members

- Public Attributes inherited from keyple::calypso::command::po::parser::security::AbstractOpenSessionRespPars
std::shared_ptr< SecureSessionmSecureSession
 
- Protected Member Functions inherited from keyple::calypso::command::po::parser::security::AbstractOpenSessionRespPars
const std::map< int, std::shared_ptr< StatusProperties > > & getStatusTable () const override
 
- Protected Member Functions inherited from keyple::calypso::command::po::AbstractPoResponseParser
const KeypleSeCommandException buildCommandException (const std::type_info &exceptionClass, const std::string &message, const std::shared_ptr< SeCommand > commandRef, const int statusCode) const override
 
- Protected Member Functions inherited from keyple::core::command::AbstractApduResponseParser
virtual const std::shared_ptr< SeCommandgetCommandRef () const
 
- Protected Attributes inherited from keyple::core::command::AbstractApduResponseParser
std::shared_ptr< ApduResponsemResponse
 
AbstractApduCommandBuildermBuilder
 
- Static Protected Attributes inherited from keyple::core::command::AbstractApduResponseParser
static const std::map< int, std::shared_ptr< StatusProperties > > STATUS_TABLE
 

Constructor & Destructor Documentation

◆ OpenSession10RespPars()

keyple::calypso::command::po::parser::security::OpenSession10RespPars::OpenSession10RespPars ( std::shared_ptr< ApduResponse response,
OpenSession10CmdBuild builder 
)

Instantiates a new OpenSession10RespPars from the response.

Parameters
responsefrom OpenSession10RespPars
builderthe reference to the builder that created this parser

C++ vs. Java: Do not remove. This code is required as the base class constructor cannot call a derived class member function.

Member Function Documentation

◆ createSecureSession()

std::shared_ptr< SecureSession > keyple::calypso::command::po::parser::security::OpenSession10RespPars::createSecureSession ( const std::vector< uint8_t > &  apduResponseData)
static

In rev 1.0 mode, the response to the Open Secure Session command is as follows:

CC CC CC CC [RR RR] [NN..NN]

Where:

  • CC CC CC CC = PO challenge
  • RR RR = ratification bytes (may be absent)
  • NN..NN = record data (29 bytes)

Legal length values are:

  • 4: ratified, 4-byte challenge, no data
  • 33: ratified, 4-byte challenge, 29 bytes of data
  • 6: not ratified (2 ratification bytes), 4-byte challenge, no data
  • 35 not ratified (2 ratification bytes), 4-byte challenge, 29 bytes of data

◆ toSecureSession()

std::shared_ptr< SecureSession > keyple::calypso::command::po::parser::security::OpenSession10RespPars::toSecureSession ( const std::vector< uint8_t > &  apduResponseData)
overridevirtual

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