Public Member Functions | |
Session (Slot *slot, Token *token, CK_VOID_PTR data, CK_NOTIFY notifyFunc) | |
Session (Session *other) | |
~Session (void) | |
CK_RV | getInfo (CK_SESSION_INFO *info) |
CK_RV | login (CK_USER_TYPE userType, const char *pin) |
CK_RV | login () |
CK_RV | logout (void) |
CK_RV | findObjects (CK_ATTRIBUTE_PTR attributes, CK_ULONG ulCount) |
list< CryptoObject * > | getSearchResults (CK_ULONG maxToFetch) |
UTILCardHandle | getHandle () |
CK_SESSION_HANDLE | getId () |
CryptoObject * | getObjectFromToken (CK_OBJECT_HANDLE handle) |
bool | isLoggedIn () |
bool | isNotLoggedIn () |
CK_RV | sign (CK_BYTE *in, CK_ULONG inLen, CK_BYTE *out, CK_ULONG *outLen) |
CK_RV | decrypt (CK_BYTE *in, CK_ULONG inLen, CK_BYTE *out, CK_ULONG *outLen) |
void | activate (CK_MECHANISM_TYPE mechanism, CK_OBJECT_HANDLE privKeyId) |
Token * | getToken () |
void | clearSearchResults () |
CK_OBJECT_HANDLE | getActiveObj () |
CK_MECHANISM_TYPE | getActiveMechanism () |
|
Creates new Session instance existing between 'slot' and 'token'
|
|
A copy constructor. Performs a shallow copy except for the ID, which is incremented. This constructor may not be necessary now that exclusivity problems have been ironed out of the middleware (or at least I think they have)
|
|
If this is the last instance to be destroyed then it logs out of the card |
|
The mechanism necessary for Cryptoki to get information about this session
|
|
Logs into the card application. By having this session you are connected to the card but not authenticated. Only 1 successfull login to the card is necessary
|
|
Logs into the card application with the already cached pin. If you haven't used the other login method this will fail.
|
|
logs out of the card application.
|
|
If there had to be 1 method that was the most important this would be it. Cryptoki uses this to find 'Objects' that it needs to perform crypto ops. The array of attributes is applied to all of the objects available and returns an ANDed result. So, all objects that have ALL attributes
|
|
retrieves the search results from a prior call to findObjects.
|
|
returns the handle used to access the card. This really should only be accessed by other cryptoki objects
|
|
returns the id that Cryptoki will use to lookup the session at a later point
|
|
given an Object handle, returns that object
|
|
|
|
a convenience method for ease of reading.
|
|
This method directly supports Cryptoki and signs upto 128 bytes and signs using the active mechanism
|
|
This method directly supports Cryptoki and decrypts data represented by 'in'
|
|
sets the active Mechanism and private key object that will be used for Signing
|
|
|
|
clears the search results from a prior findObject call. |
|
|
|
|