|
|
@ -879,16 +879,10 @@ namespace cryptoki { |
|
|
|
CRYPTOLOG("ID="<<_slot); |
|
|
|
CRYPTOLOG("ID="<<_slot); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Slots are created from Library::slotList.
|
|
|
|
|
|
|
|
Slot(const Library& lib, CK_SLOT_ID slot): |
|
|
|
|
|
|
|
_library(lib), _slot(slot), _res(CKR_OK) { |
|
|
|
|
|
|
|
CRYPTOLOG("ID="<<_slot); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Slots are created from Library::slotList.
|
|
|
|
/// Slots are created from Library::slotList.
|
|
|
|
/** Empty constructor needs immediate assignment. */ |
|
|
|
/** @note Empty constructor needs immediate assignment. This
|
|
|
|
|
|
|
|
constructor is public only to be inserted to STL |
|
|
|
|
|
|
|
containers. */ |
|
|
|
Slot(): _slot(0), _res(-1) { |
|
|
|
Slot(): _slot(0), _res(-1) { |
|
|
|
CRYPTOLOG("ID="<<_slot); |
|
|
|
CRYPTOLOG("ID="<<_slot); |
|
|
|
} |
|
|
|
} |
|
|
@ -901,6 +895,14 @@ namespace cryptoki { |
|
|
|
return *this; |
|
|
|
return *this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Slots are created from Library::slotList.
|
|
|
|
|
|
|
|
Slot(const Library& lib, CK_SLOT_ID slot): |
|
|
|
|
|
|
|
_library(lib), _slot(slot), _res(CKR_OK) { |
|
|
|
|
|
|
|
CRYPTOLOG("ID="<<_slot); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool check(CK_RV result, const std::string& context="") { |
|
|
|
bool check(CK_RV result, const std::string& context="") { |
|
|
|
_res = result; |
|
|
|
_res = result; |
|
|
|
if (_library.exc() && !*this) { |
|
|
|
if (_library.exc() && !*this) { |
|
|
|