Carla Schaffner wrote:
To test cryptoki / access to smart card we have the code below.
Does anyone know why the function C_Initialize from the cryptoki header file
is not accessible?
[snip]
----------- Error---------------------
ReadCert.c: In function `main':
/tmp/ccvfY2Ep.o(.text+0x16): In function `main':
: undefined reference to `C_Initialize'
/tmp/ccvfY2Ep.o(.text+0x3c): In function `main':
: undefined reference to `C_Finalize'
I'm not familiar with opensc's header files, but as I recall, in PKCS11
v2.0 and later, C_Initialize is the name of a pointer to a function.
That pointer is a member of struct CK_FUNCTION_LIST. You get the module's
function list pointer by calling C_GetFunctionList. Then you call the
other C_* function through the pointers in that table. C_GetFunctionList
is often the only function exported directly from a PKCS11 v2.x module.
--
Nelson B