diff options
Diffstat (limited to 'src/Common/EMVToken.h')
-rw-r--r-- | src/Common/EMVToken.h | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/Common/EMVToken.h b/src/Common/EMVToken.h index 1d84ec28..a1c0a2e1 100644 --- a/src/Common/EMVToken.h +++ b/src/Common/EMVToken.h @@ -6,44 +6,36 @@ #define EMV_CARDS_LABEL L"EMV Certificates" -#include "Platform/PlatformBase.h" -#if defined (TC_WINDOWS) && !defined (TC_PROTOTYPE) -# include "Exception.h" -#else -# include "Platform/Exception.h" -#endif - -#include "Token.h" -#include "IccDataExtractor.h" - -namespace VeraCrypt { +#include "EMVCard.h" +namespace VeraCrypt +{ struct EMVTokenInfo: TokenInfo { virtual ~EMVTokenInfo(); - virtual BOOL isEditable() const {return false;} + virtual BOOL isEditable() const { return false; } }; struct EMVTokenKeyfile: TokenKeyfile { - EMVTokenKeyfile(){Id = EMV_CARDS_LABEL; Token = shared_ptr<EMVTokenInfo>(new EMVTokenInfo());}; + EMVTokenKeyfile(); EMVTokenKeyfile(const TokenKeyfilePath& path); + virtual ~EMVTokenKeyfile() {}; virtual operator TokenKeyfilePath () const; virtual void GetKeyfileData(vector <byte>& keyfileData) const; - }; - class EMVToken { - private: - static IccDataExtractor extractor; + class EMVToken + { public: static bool IsKeyfilePathValid(const wstring& emvTokenKeyfilePath); - static vector<EMVTokenKeyfile> GetAvailableKeyfiles(unsigned long int* slotIdFilter = nullptr, const wstring keyfileIdFilter = wstring()); + static vector<EMVTokenKeyfile> GetAvailableKeyfiles(unsigned long int* slotIdFilter = nullptr, const wstring& keyfileIdFilter = wstring()); static EMVTokenInfo GetTokenInfo(unsigned long int slotId); friend void EMVTokenKeyfile::GetKeyfileData(vector <byte>& keyfileData) const; + static map <unsigned long int, shared_ptr<EMVCard>> EMVCards; }; } |