LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
epassidentitycardservice.hpp
Go to the documentation of this file.
1#pragma once
2
5
6namespace logicalaccess
7{
8#define IDENTITY_CARDSERVICE_EPASS "EPassIdentity"
9
10class EPassChip;
11class EPassAccessInfo;
12class LLA_CARDS_EPASS_API EPassIdentityCardService : public IdentityCardService
13{
14 public:
15 explicit EPassIdentityCardService(const std::shared_ptr<Chip> &chip);
16
17 std::chrono::system_clock::time_point getTime(MetaData what) override;
18 std::string getString(MetaData what) override;
19 ByteVector getData(MetaData what) override;
20
21 std::string getCSType() override
22 {
24 }
25 int verifyCertificate(ByteVector derCert, ByteVector x509Cert);
26 int verifyCertificate(ByteVector x509Cert);
27 int verifyCertificateWithMasterList(std::string matserlistPath);
28 int verifyCertificateWithMasterList(ByteVector derCert, std::string path);
29 ByteVector getCertificate();
30 static std::vector<ByteVector> getCSCACertificatesFromMasterlist(std::string path);
31 static ByteVector binaryTo64Certificate(ByteVector derCert);
32 static std::vector<ByteVector> extractCertificatesFromMasterList(const ByteVector &bytes);
33 std::string getExpiryDate();
34 bool isExpired();
35 protected:
36 std::shared_ptr<EPassChip> getEPassChip() const;
37
41 std::shared_ptr<EPassAccessInfo> getEPassAccessInfo() const;
42
47 EPassDG1 getDG1();
48 std::string getName();
49 ByteVector getPicture();
50
51 std::unique_ptr<EPassDG1> dg1_cache_;
52};
53}
LLA_CARDS_EPASS_API void getEPassChip(std::shared_ptr< logicalaccess::Chip > *chip)
Definition: libraryentry.cpp:13
Definition: epassidentitycardservice.hpp:13
std::string getCSType() override
Definition: epassidentitycardservice.hpp:21
std::unique_ptr< EPassDG1 > dg1_cache_
Definition: epassidentitycardservice.hpp:51
Definition: identity_service.hpp:11
MetaData
Definition: identity_service.hpp:14
#define IDENTITY_CARDSERVICE_EPASS
Definition: epassidentitycardservice.hpp:8
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
Definition: asn1.hpp:9
Definition: utils.hpp:59