From: Vincent Le T. <vin...@my...> - 2015-10-10 10:26:49
|
Caching the Windows container seems to be more difficult than I thought. Indeed, when a key is generated, the Windows GUID is saved to the key reference when calling: sc_pkcs15init_generate_key https://github.com/OpenSC/OpenSC/blob/5dd806815de8ee56c4458a6a00ec7404aa6241b8/src/pkcs15init/pkcs15-lib.c#L1295-L1303 Then this Windows GUID is returned in each further calls to sc_pkcs15_get_object_guid with this key, the function used to return the guid in further minidriver load https://github.com/OpenSC/OpenSC/blob/5944915e0ef8d8af73c5c41deb9f12c6d35b80c0/src/libopensc/pkcs15.c#L2721-L2728 => my attempt to do caching on the minidriver source code only is useless I've also discovered than you can overwrite the container name using a special file stored on the card (function md_pkcs15_update_container_from_do) I'll need to: - extend the caching in pkcs15-lib.c / pkcs15.c from a key context to a process context - add the same code to the save key code (only the key generation does caching) Vincent |