Hi,

I have provided stub implementations for all the pkcs11 ver2.10
functions
to be used by netscape, after netscape has successfully execute
C_GetFunctionList(..), it crashes after  exiting
C_GetFunctionList(...),
without calling any other of my pkcs11 functions. 

I found that netscape couldn't read the memory of my C_Initialize(..)
since
the memory area pointed to by my C_Initialize(..) is the same as the
point where netscape crashes (from assembly code), but i am sure i
have returned a valid function list pointer back to netscape.

I have tested with my own console program, after i get the function
list pointer, i can call C_Initialize(..) from my console. But why
netscape crashed when it tried to call my C_Initialize(..)? as if i
have returned an invalid pointer.

any help?

Here is how i return my function pointer to netscape:
//Global declaration
CK_FUNCTION_LIST FunctionList;

CK_DEFINE_FUNCTION(CK_RV, C_GetFunctionList)(CK_FUNCTION_LIST_PTR_PTR
ppFunctionList)
{
        FunctionList.version.major = 1;
        FunctionList.version.minor = 0;
        FunctionList.C_Initialize = C_Initialize;
       
 .......//all the rest of the pkcs11 functions are here
         .....
        *ppFunctionList = &FunctionList;
        return CKR_OK;


}//netscape crashed after this, and i suspect it can't find my valid
functions pointer to the rest of my functions. I got the valid pointer
with my console, why netscape couldn't?

Reply via email to