Object PKCS#11 C++ Wrapper
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
objck::Cryptoki Class Reference

Cryptoki API
More...

#include <Cryptoki.h>

Public Member Functions

 Cryptoki (const std::string &path)
 
virtual ~Cryptoki ()
 
void initialize ()
 
Info getInfo ()
 
FunctionList getFunctionList ()
 
void initToken (unsigned int slot, std::string &soPin, std::string &label)
 
Session openSession (unsigned int slot, SessionInfo::SessionFlags flags=SessionInfo::SERIAL_SESSION, CryptokiNotify *notify=0, void *appPtr=0)
 
void closeAllSessions (unsigned int slot)
 

Protected Member Functions

void loadModule (const std::string &path)
 
void closeModule ()
 
void loadFunctions ()
 
void finalize ()
 

Protected Attributes

void * _module
 
CK_FUNCTION_LIST_PTR _functionList
 

Detailed Description

Cryptoki API

This class calls pkcs11 functions from pkcs11 module. The module is loaded dynamically and functions are called through CK_FUNCTION_LIST.

Module must implement 'C_GetFunctionList'

See also
pkcs11.h
CryptokiException.h
Author
Lucas Pandolfo Perin

Constructor & Destructor Documentation

objck::Cryptoki::Cryptoki ( const std::string &  path)
objck::Cryptoki::~Cryptoki ( )
virtual

Member Function Documentation

void objck::Cryptoki::closeModule ( )
protected

Protected function that unloads the pkcs11 module from libdl.

void objck::Cryptoki::loadFunctions ( )
protected

Protected funtion that loads all the PKCS#11 functions using C_GetFunctionList. The PKCS#11 module must implement this function in order for this API to work.

void objck::Cryptoki::loadModule ( const std::string &  path)
protected

Protected function that loads the pkcs11 module usinf libdl, dynamically.

Member Data Documentation

CK_FUNCTION_LIST_PTR objck::Cryptoki::_functionList
protected
void* objck::Cryptoki::_module
protected

The documentation for this class was generated from the following files: