From: Martin V. <mv...@gm...> - 2015-11-27 13:48:21
|
Hello, On Thu, Nov 26, 2015 at 3:21 PM, Frank Morgner < mo...@in...> wrote: > I withdrew my original PR to create a new one: > https://github.com/OpenSC/OpenSC/pull/618 > Please check if it fits your needs of statelessness! > I looked at the patch/source, but I cannot test. The Problem is, my StarCos 3.2 card currently does not work with the D-Trust starcos 3.4 driver. I would have expected a different handling, with callback functions on the card driver level ,eg: // callbacks into card plugins. typedef void* sc_card_state_t; sc_card_state_t* card_alloc_state(); card_free_state(sc_card_state_t* sc_card_state); int card_save_state(void** ptr); int card_restore_state(void* ptr); Where the driver can store "what is needed" for this card. The pkcs11 layer then have to keep track for the slot<->void pointer, with a hash. If a card supports auth cookies, it can do that in the void pointer, or if not it can store the directory/pin. This means the pkcs11 layer does not know about: "struct sc_pkcs11_login", but only manages a dummy typedef. regards, Martin |