Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6ITokenImpl::openSession ( CK_RV pRV,
CK_SLOT_ID  slotId,
CK_FLAGS  flags,
CK_VOID_PTR  pApplication,
CK_NOTIFY  Notify,
CK_SESSION_HANDLE_PTR  phSession 
)
pure virtual

Invoked when the PKCS 11 C_OpenSession() function is called.

Note that the enclosing library has allocated a session handle and passed it in as the last parameter. All session handles are generated from one source while object handles are generated by each token implementation.

All other parameters are as defined by the PKCS 11 Version 2.40 specification (see reference 1). The function return code is meant to convey an error to the enclosing PKCS 11 library, while the pRV parameter returns specific PKCS 11 error codes to the calling application.

Parameters
pRV[ out ] PKCS 11 return value to be returned to the caller. CKR_FUNCTION_NOT_SUPPORTED is returned if the function is not implemented.
hSession[ in ] different vrom C_OpenSession in that this parameter is an input rather than an output of this function. All session handles are generated by the enclosing PKCS 11 library.
Returns
SuccessP6R::eOk 
FailureP6R::eNotInitializedA call to initialize() has not been made.
P6R::eInvalidState