Hi, Sorry in advance for some of my questions that may sound irrelevant ; I'm a newbie...
Here is the context : I am trying to add support to opensc for an applet hosted on a javacard. The applet currently answers to my APDUs correctly, using pcsc-lite. I take inspiration from the card-muscle.c module to implement the required functions of my applet in opensc (say in "card-mycard.c"). As a beginning, I would just like my card to sign some data after the user has successfully authentified himself with the card. I use the pkcs11-tool to test my implementation. I have already added the required stuff for the applet to be recognized by opensc and to start the applet in the early stages of the communication between the computer and the card (i.e., in the match_card() function). Here is the problem I am facing : it seems like the initial C_Initialize() function of opensc leads to the invocation of mycard_select_file() function, during the enumeration of "frameworks", the first of which is related to pkcs15 (as seen in pkcs11/slot.c). That call to sc_select_file triggers the following error : sc_pkcs15_bind_internal: unable to enumerate apps: Not supported First, I do not understand why the invocation of the PKCS11 C_Initialize() function requires a call to mycard_select_file(). More important, the applet requires the user to be authentified *before* any operation is requested, including the enumeration of the files stored on the card. So, my question is : what is the best way for me to deal with that problem? Should I bypass the call to select_file() during C_Initialize (and how should I implement this)? Should I return something special to that call? Something else? One last question : is there some kind of a howto to add support for a new smartcard to opensc? Thanks in advance for your help, Best regards, Ben
_______________________________________________ opensc-devel mailing list [email protected] http://www.opensc-project.org/mailman/listinfo/opensc-devel
