AusweisApp
Lade ...
Suche ...
Keine Treffer
eid_applet_interface_mock.cpp-Dateireferenz
#include "eid_applet_interface_mock.h"
#include "MockSmartEidRestClient.h"
#include <QQueue>
#include <QSharedPointer>
#include <cassert>
#include <iostream>
Include-Abhängigkeitsdiagramm für eid_applet_interface_mock.cpp:

Klassen

struct  Data
 

Funktionen

QSharedPointer< governikus::MockSmartEidRestClientmRestInterface (new governikus::MockSmartEidRestClient)
 
EidSupportStatusResult getSmartEidSupportInfo ()
 
EidStatus getSmartEidStatus ()
 Provides the current Smart-eID Status. This function does not include an online-check.
 
ServiceInformationResult getServiceInformation ()
 Request the service information of the Smart-eID. This function does not include an online-check.
 
EidServiceResult installSmartEid (const ProgressHandler &)
 
EidServiceResult deleteSmartEid (const ProgressHandler &)
 
GenericDataResult performAPDUCommand (const std::string &pCommandApdu)
 Performs APDU command.
 
GenericDataResult performPersonalization (const std::string &pCommandPersonalization)
 Performs personalization in a generic way controlled by Personalization Service.
 
InitializeResult initializePersonalization (const std::string &pChallenge, const std::string &pPin)
 Performs initialization of the Personalization.
 
EidServiceResult deletePersonalization ()
 Delete Personalization from eID Applet.
 
PrepareIdentificationResult prepareIdentification (const std::string &pChat)
 Prepares the identification and returns the PrepareIdentificationResult.
 
GenericDataResult getChallenge ()
 Get Challenge.
 
TAandCAResult performTAandCA (const std::list< std::string > &pTerminalCvcChain, const std::string &pAuxiliaryData, const std::string &pSignature, const std::string &pPin, const std::string &pEphemeralPublicKey)
 Performs the terminal and chip authentication.
 
GenericDataResult initializeService ()
 Performs initialization of eID-Applet-Service-Lib.
 
PersonalizationResult finalizePersonalization (int pStatus)
 
EidServiceResult releaseAppletConnection ()
 Closes any open channel to the SE.
 
GenericDataResult shutdownService ()
 Release all resources and shut down the eID-Applet-Service-Lib on Android.
 

Variablen

struct Data mData
 

Dokumentation der Funktionen

◆ deletePersonalization()

EidServiceResult deletePersonalization ( )

Delete Personalization from eID Applet.

Rückgabe
EidServiceResult
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

◆ deleteSmartEid()

EidServiceResult deleteSmartEid ( const ProgressHandler & pHandler)

Performs remote deletion of the eID-applet in eSE on this device, or resets ATM module, keychain items and Secure Enclave elements.

Parameter
pHandlerfunction pointer of the implemented ProgressHandler function
Rückgabe
EidServiceResult
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ finalizePersonalization()

PersonalizationResult finalizePersonalization ( int status = 0)

Finalize the personalization flow and provide the init-eID-PIN as a return value. This function call also closes the channel to the Supplementary Security Domain from the Service Provider and adjusts the EidStatus in an error event accordingly. Thus, this function must also be called in the event of an error, e.g. if personalization flow has been interrupted.

Parameter
statusThe status code of the performed personalization.
Rückgabe
PersonalizationResult mInitPin contains the initial-eID-PIN used for personalization. If the mInitPIN is blank, a new personalization must be started.
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

◆ getChallenge()

GenericDataResult getChallenge ( )

Get Challenge.

Rückgabe
GenericDataResult with challenge according to EAC1OutputType in TR-03112-7 3.6.4.1. byte2hex encoded and terminated with 9000.
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ getServiceInformation()

ServiceInformationResult getServiceInformation ( )

Request the service information of the Smart-eID. This function does not include an online-check.

Rückgabe
ServiceInformationResult
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ getSmartEidStatus()

EidStatus getSmartEidStatus ( )

Provides the current Smart-eID Status. This function does not include an online-check.

Rückgabe
The status of the Smart-eID e.g. EidStatus::NO_PERSONALIZATION for the eID-Applet.
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ getSmartEidSupportInfo()

EidSupportStatusResult getSmartEidSupportInfo ( )

Provides information of available updates of the installed eID-Applet and/or CSP implementation or whether the device is supported by Trusted Service Management System. The function includes an online-check.

Rückgabe
EidSupportStatusResult with the supportInfo of the Smart-eID e.g. EidSupportStatus::UPDATE_AVAILABLE for the eID-Applet.
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ initializePersonalization()

InitializeResult initializePersonalization ( const std::string & pChallenge,
const std::string & pPin = "" )

Performs initialization of the Personalization.

Parameter
pChallengebase64 encoded challenge for key attestation.
pPinfrom AA2 validated 6 digit PIN, once the user entered the mobile-ID-PIN 2 times. It is only required for HW_KEYSTORE and will be ignored in all other cases.
Rückgabe
InitializeResult with base64 encoded public key and signed challenge
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

◆ initializeService()

GenericDataResult initializeService ( )

Performs initialization of eID-Applet-Service-Lib.

Rückgabe
GenericDataResult mData is blank if mResult is equal to EidServiceResult::SUCCESS, otherwise it contains an error message

◆ installSmartEid()

EidServiceResult installSmartEid ( const ProgressHandler & pHandler)

Performs the remote provisioning of the eID-applet from the Trusted Service Management System to the eSE on this device, or the ATM module initialization and the license check.

Parameter
pHandlerfunction pointer of the implemented ProgressHandler function
Rückgabe
EidServiceResult
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ mRestInterface()

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ performAPDUCommand()

GenericDataResult performAPDUCommand ( const std::string & pCommandApdu)

Performs APDU command.

Parameter
pCommandApdubyte2hex encoded APDU
Rückgabe
GenericDataResult with byte2hex encoded APDU response
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ performPersonalization()

GenericDataResult performPersonalization ( const std::string & pCommand)

Performs personalization in a generic way controlled by Personalization Service.

Parameter
pCommandbyte2hex encoded Command e.g APDU for Android
Rückgabe
GenericDataResult with byte2hex encoded command response for the personalization step
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

◆ performTAandCA()

TAandCAResult performTAandCA ( const std::list< std::string > & pTerminalCvcChain,
const std::string & pAuxiliaryData,
const std::string & pSignature,
const std::string & pPin,
const std::string & pEphemeralPublicKey )

Performs the terminal and chip authentication.

Parameter
pTerminalCvcChainList representing the terminal certificate chain according to EAC1InputType in TR-03112-7 3.6.4.1. The first element is the terminal certificate, the last element is the certificate signed by the certificate referenced by the CAR in the prepareIdentification response. The elements of the list are byte2hex encoded. Example: 7f218201487f4e8201005f29010042104445445674494447564b333030303132 7f494f060a04007f00070202020203864104a7ba9a8cd0f294ea653ab42cb713 54af775d6fa98091dfe3af602cfe3837225a2e8573384b16d6fc9215815a9c47 fbdd3fb0224a184a6146198d7ee5c77837585f200e444544454d4f5041413030 3436347f4c12060904007f0007030102025305000513ff075f25060201000301 015f2406020100040100655e732d060904007f00070301030180204ebb52e497 c3549ca1102ecf55b6626c1afb00d2cdfcad369d37083ece26139e732d060904 007f00070301030280206ccf8efd02e71b274c8c4f29122310ef2d7ffdfb4c61 1fe267f8576da42e7ba25f37402b096b45c029b2184cba8d745431a6820e4bcb b7ba14d3c7745dddec147cc1d208fe0547ebcc44e7384a52aafb39f7d83e43e6 15ad9a22b84cd911e75171e555
pAuxiliaryDataAuthenticated Auxiliary Data according to EAC1InputType in TR-03112-7 3.6.4.1. byte2hex encoded. Example: 67177315060904007f00070301040253083230323130333136
pSignatureSignature according to EAC2InputType TR-03112-7 3.6.4.2. byte2hex encoded. Example: 0d472d904137c057a9d7c34d675413326050549f71fc04aa625791dc5debedca 20d6dce02bc11c2ad6b0b749e9440099924b429101255dfdb02029e720f06714
pPinfrom AA2 validated 6 digit PIN, once the user entered the mobile-ID-PIN 2 times.
pEphemeralPublicKeyEphemeralPublicKey according to EAC2InputType TR-03112-7 3.6.4.2. byte2hex encoded. Example: 045e5297e977a637b30834632934d1e00ade870053d740d64a5df9efb938bd29c4 682b803fc5857fc9ffe6aae16e4254c02b2cc8d861226501e152776954d6643d
Rückgabe
TAandCAResult according to EAC2OutputType TR-03112-7 3.6.4.2., byte2hex encoded

◆ prepareIdentification()

PrepareIdentificationResult prepareIdentification ( const std::string & pChat)

Prepares the identification and returns the PrepareIdentificationResult.

Parameter
pChatCertificateHolderAuthorizationTemplate according to EAC1OutputType in TR-03112-7 3.6.4.1. byte2hex encoded. Example: 7f4c12060904007f0007030102025305000513ff00
Rückgabe
UserAuthenticationResult according to EAC1OutputType in TR-03112-7 3.6.4.1., byte2hex encoded

◆ releaseAppletConnection()

EidServiceResult releaseAppletConnection ( )

Closes any open channel to the SE.

Rückgabe
EidServiceResult

◆ shutdownService()

GenericDataResult shutdownService ( )

Release all resources and shut down the eID-Applet-Service-Lib on Android.

Rückgabe
GenericDataResult mData is blank if mResult is equal to EidServiceResult::SUCCESS, otherwise it contains an error message
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

Variablen-Dokumentation

◆ mData

struct Data mData