libcryptosec
SmartcardSlots.h
Go to the documentation of this file.
1 #ifndef SMARTCARDSLOTS_H_
2 #define SMARTCARDSLOTS_H_
3 
4 #include <libp11.h>
5 #include <openssl/x509.h>
6 
7 #include <string>
8 #include <vector>
9 
11 
12 #include "SmartcardCertificate.h"
13 #include "SmartcardSlot.h"
14 
16 
24 {
25 
26 public:
27 
36  SmartcardSlots(PKCS11_CTX *ctx, PKCS11_SLOT *scSlots, unsigned int nslots);
37 
41  virtual ~SmartcardSlots();
42 
52  SmartcardSlot* getSmartcardSlot(std::string serial, std::string id)
54 
61  std::vector<SmartcardCertificate *> getCertificates()
63 
68  unsigned int getSlotsCount();
69 
70 protected:
71 
75  PKCS11_CTX *ctx;
76 
80  PKCS11_SLOT *scSlots;
81 
85  unsigned int nslots;
86 
87 };
88 
89 #endif /*SMARTCARDSLOTS_H_*/
Definition: SmartcardSlot.h:19
SmartcardSlot * getSmartcardSlot(std::string serial, std::string id)
Definition: SmartcardSlots.cpp:15
PKCS11_SLOT * scSlots
Definition: SmartcardSlots.h:80
Definition: SmartcardSlots.h:23
SmartcardSlots(PKCS11_CTX *ctx, PKCS11_SLOT *scSlots, unsigned int nslots)
Definition: SmartcardSlots.cpp:3
unsigned int nslots
Definition: SmartcardSlots.h:85
virtual ~SmartcardSlots()
Definition: SmartcardSlots.cpp:10
Definition: SmartcardModuleException.h:6
PKCS11_CTX * ctx
Definition: SmartcardSlots.h:75
unsigned int getSlotsCount()
Definition: SmartcardSlots.cpp:142
std::vector< SmartcardCertificate * > getCertificates()
Definition: SmartcardSlots.cpp:71