AusweisApp
|
#include "eid_applet_interface_mock.h"
#include "MockSmartEidRestClient.h"
#include <QQueue>
#include <QSharedPointer>
#include <cassert>
#include <iostream>
Klassen | |
struct | Data |
Funktionen | |
QSharedPointer< governikus::MockSmartEidRestClient > | mRestInterface (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 |
EidServiceResult deletePersonalization | ( | ) |
Delete Personalization from eID Applet.
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.
pHandler | function pointer of the implemented ProgressHandler function |
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.
status | The status code of the performed personalization. |
GenericDataResult getChallenge | ( | ) |
Get Challenge.
ServiceInformationResult getServiceInformation | ( | ) |
Request the service information of the Smart-eID. This function does not include an online-check.
EidStatus getSmartEidStatus | ( | ) |
Provides the current Smart-eID Status. This function does not include an online-check.
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.
InitializeResult initializePersonalization | ( | const std::string & | pChallenge, |
const std::string & | pPin = "" ) |
Performs initialization of the Personalization.
pChallenge | base64 encoded challenge for key attestation. |
pPin | from 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. |
GenericDataResult initializeService | ( | ) |
Performs initialization of eID-Applet-Service-Lib.
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.
pHandler | function pointer of the implemented ProgressHandler function |
QSharedPointer< governikus::MockSmartEidRestClient > mRestInterface | ( | new governikus::MockSmartEidRestClient | ) |
GenericDataResult performAPDUCommand | ( | const std::string & | pCommandApdu | ) |
Performs APDU command.
pCommandApdu | byte2hex encoded APDU |
GenericDataResult performPersonalization | ( | const std::string & | pCommand | ) |
Performs personalization in a generic way controlled by Personalization Service.
pCommand | byte2hex encoded Command e.g APDU for Android |
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.
pTerminalCvcChain | List 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 |
pAuxiliaryData | Authenticated Auxiliary Data according to EAC1InputType in TR-03112-7 3.6.4.1. byte2hex encoded. Example: 67177315060904007f00070301040253083230323130333136 |
pSignature | Signature according to EAC2InputType TR-03112-7 3.6.4.2. byte2hex encoded. Example: 0d472d904137c057a9d7c34d675413326050549f71fc04aa625791dc5debedca 20d6dce02bc11c2ad6b0b749e9440099924b429101255dfdb02029e720f06714 |
pPin | from AA2 validated 6 digit PIN, once the user entered the mobile-ID-PIN 2 times. |
pEphemeralPublicKey | EphemeralPublicKey according to EAC2InputType TR-03112-7 3.6.4.2. byte2hex encoded. Example: 045e5297e977a637b30834632934d1e00ade870053d740d64a5df9efb938bd29c4 682b803fc5857fc9ffe6aae16e4254c02b2cc8d861226501e152776954d6643d |
PrepareIdentificationResult prepareIdentification | ( | const std::string & | pChat | ) |
Prepares the identification and returns the PrepareIdentificationResult.
pChat | CertificateHolderAuthorizationTemplate according to EAC1OutputType in TR-03112-7 3.6.4.1. byte2hex encoded. Example: 7f4c12060904007f0007030102025305000513ff00 |
EidServiceResult releaseAppletConnection | ( | ) |
Closes any open channel to the SE.
GenericDataResult shutdownService | ( | ) |
Release all resources and shut down the eID-Applet-Service-Lib on Android.
struct Data mData |