Portuguese eID Middleware SDK  Version: 3.12.0
eIDMW::PTEID_EIDCard Class Reference

#include <eidlib.h>

Public Member Functions

virtual PTEIDSDK_API ~PTEID_EIDCard ()
 
PTEIDSDK_API PTEID_EIdgetID ()
 
PTEIDSDK_API PTEID_AddressgetAddr ()
 
PTEIDSDK_API PTEID_SodgetSod ()
 
PTEIDSDK_API PTEID_CardVersionInfogetVersionInfo ()
 
PTEIDSDK_API PTEID_PublicKeygetRootCAPubKey ()
 
PTEIDSDK_API void doSODCheck (bool check)
 
PTEIDSDK_API bool Activate (const char *pinCode, PTEID_ByteArray &BCDDate, bool blockActivationPIN)
 
- Public Member Functions inherited from eIDMW::PTEID_SmartCard
virtual PTEIDSDK_API ~PTEID_SmartCard ()=0
 
PTEIDSDK_API void selectApplication (const PTEID_ByteArray &applicationId)
 
virtual PTEIDSDK_API PTEID_ByteArray sendAPDU (const PTEID_ByteArray &cmd, PTEID_Pin *pin=NULL, const char *csPinCode="")
 
virtual PTEIDSDK_API long readFile (const char *fileID, PTEID_ByteArray &in, PTEID_Pin *pin=NULL, const char *csPinCode="")
 
virtual PTEIDSDK_API bool writeFile (const char *fileID, const PTEID_ByteArray &out, PTEID_Pin *pin=NULL, const char *csPinCode="", unsigned long inOffset=0)
 
virtual PTEIDSDK_API unsigned long pinCount ()
 
virtual PTEIDSDK_API PTEID_PinsgetPins ()
 
virtual PTEIDSDK_API unsigned long certificateCount ()
 
- Public Member Functions inherited from eIDMW::PTEID_Card
virtual PTEIDSDK_API ~PTEID_Card ()=0
 
virtual PTEIDSDK_API PTEID_CardType getType ()
 
virtual PTEIDSDK_API PTEID_ByteArray sendAPDU (const PTEID_ByteArray &cmd)
 
virtual PTEIDSDK_API PTEID_ByteArray Sign (const PTEID_ByteArray &data, bool signatureKey=false) override
 
virtual PTEIDSDK_API PTEID_ByteArray SignSHA256 (const PTEID_ByteArray &data, bool signatureKey=false) override
 
virtual PTEIDSDK_API PTEID_ByteArray Sign (const PTEID_ByteArray &data, PTEID_RSAPaddingType paddingType, bool signatureKey=false)
 
virtual PTEIDSDK_API PTEID_ByteArray SignXades (const char *output_path, const char *const *paths, unsigned int n_paths, PTEID_SignatureLevel level=PTEID_LEVEL_BASIC) override
 
virtual PTEIDSDK_API PTEID_ByteArray SignXadesT (const char *output_path, const char *const *paths, unsigned int n_paths) override
 
virtual PTEIDSDK_API PTEID_ByteArray SignXadesA (const char *output_path, const char *const *paths, unsigned int n_paths) override
 
virtual PTEIDSDK_API void SignXadesIndividual (const char *output_path, const char *const *paths, unsigned int n_paths) override
 
virtual PTEIDSDK_API void SignXadesTIndividual (const char *output_path, const char *const *paths, unsigned int n_paths) override
 
virtual PTEIDSDK_API void SignXadesAIndividual (const char *output_path, const char *const *paths, unsigned int n_paths) override
 
virtual PTEIDSDK_API int SignPDF (PTEID_PDFSignature &sig_handler, int page, int page_sector, bool is_landscape, const char *location, const char *reason, const char *outfile_path) override
 
virtual PTEIDSDK_API int SignPDF (PTEID_PDFSignature &sig_handler, int page, double coord_x, double coord_y, const char *location, const char *reason, const char *outfile_path) override
 
virtual PTEIDSDK_API PTEID_CertificatesgetCertificates () override
 
virtual PTEIDSDK_API PTEID_CertificategetCert (PTEID_CertifType type) override
 
virtual PTEIDSDK_API PTEID_CertificategetRoot () override
 
virtual PTEIDSDK_API PTEID_CertificategetCA () override
 
virtual PTEIDSDK_API PTEID_CertificategetSignature () override
 
virtual PTEIDSDK_API PTEID_CertificategetAuthentication () override
 
virtual PTEIDSDK_API PTEID_SigningDeviceType getDeviceType () override
 
virtual PTEIDSDK_API PTEID_ByteArray readFile (const char *fileID, unsigned long ulOffset=0, unsigned long ulMaxLength=0)
 
virtual PTEIDSDK_API bool writeFile (const char *fileID, const PTEID_ByteArray &oData, unsigned long ulOffset=0)
 
virtual PTEIDSDK_API void initPaceAuthentication (const char *secret, size_t length, PTEID_CardPaceSecretType secretType)
 
- Public Member Functions inherited from eIDMW::PTEID_Object
virtual PTEIDSDK_API ~PTEID_Object ()=0
 
NOEXPORT_PTEIDSDK void Init (const SDK_Context *context, void *impl)
 
NOEXPORT_PTEIDSDK void Release ()
 

Protected Member Functions

 PTEID_EIDCard (const SDK_Context *context, APL_Card *impl)
 
- Protected Member Functions inherited from eIDMW::PTEID_SmartCard
 PTEID_SmartCard (const SDK_Context *context, APL_Card *impl)
 
- Protected Member Functions inherited from eIDMW::PTEID_Card
 PTEID_Card (const SDK_Context *context, APL_Card *impl)
 
- Protected Member Functions inherited from eIDMW::PTEID_Object
 PTEID_Object (const SDK_Context *context, void *impl)
 
void addObject (PTEID_Object *impl)
 
void backupObject (unsigned long idx)
 
PTEID_ObjectgetObject (unsigned long idx)
 
PTEID_ObjectgetObject (void *impl)
 
void delObject (unsigned long idx)
 
void delObject (void *impl)
 
void checkContextStillOk () const
 
 PTEID_Object (const PTEID_Object &obj)
 
PTEID_Objectoperator= (const PTEID_Object &obj)
 

Friends

PTEID_CardPTEID_ReaderContext::getCard ()
 

Additional Inherited Members

- Protected Attributes inherited from eIDMW::PTEID_Object
bool m_delimpl
 
void * m_impl
 
unsigned long m_ulIndexExtAdd
 
std::map< unsigned long, PTEID_Object * > m_objects
 
SDK_Context * m_context
 

Detailed Description

This class represents a Portugal EID card. To get such an object you have to ask it from the ReaderContext.

Constructor & Destructor Documentation

◆ ~PTEID_EIDCard()

virtual PTEIDSDK_API eIDMW::PTEID_EIDCard::~PTEID_EIDCard ( )
virtual

Destructor

◆ PTEID_EIDCard()

eIDMW::PTEID_EIDCard::PTEID_EIDCard ( const SDK_Context *  context,
APL_Card *  impl 
)
protected

For internal use : Constructor

Member Function Documentation

◆ Activate()

PTEIDSDK_API bool eIDMW::PTEID_EIDCard::Activate ( const char *  pinCode,
PTEID_ByteArray BCDDate,
bool  blockActivationPIN 
)

Activate the Pteid card by writing the contents of the supplied PTEID_ByteArray in the card TRACE file

Parameters
BCDDatecontent to be written in the activation flag file (limited to 8 bytes) - recommended way to use is to supply the current date in BCD format (Binary coded decimal)
pinCodeActivation PIN value
blockActivationPINBoolean flag used in test mode to avoid blocking the Activation PIN after first use

◆ doSODCheck()

PTEIDSDK_API void eIDMW::PTEID_EIDCard::doSODCheck ( bool  check)

Enable/disable the verification of ID and address data against the SOD file

◆ getAddr()

PTEIDSDK_API PTEID_Address& eIDMW::PTEID_EIDCard::getAddr ( )

Get the Address document

◆ getID()

PTEIDSDK_API PTEID_EId& eIDMW::PTEID_EIDCard::getID ( )

Get the id document

◆ getRootCAPubKey()

PTEIDSDK_API PTEID_PublicKey& eIDMW::PTEID_EIDCard::getRootCAPubKey ( )

Get the CVC CA public key that this card uses to verify the CVC key

◆ getSod()

PTEIDSDK_API PTEID_Sod& eIDMW::PTEID_EIDCard::getSod ( )

Get the SOD document

◆ getVersionInfo()

PTEIDSDK_API PTEID_CardVersionInfo& eIDMW::PTEID_EIDCard::getVersionInfo ( )

Get the info document

Friends And Related Function Documentation

◆ PTEID_ReaderContext::getCard

For internal use : This method must access protected constructor