From: Vincent Le T. <vin...@my...> - 2015-10-05 18:53:33
|
I'm working on the minidriver read/write mode and especially the certificate enrollment process. When a container is created on the minidriver, there is 3 ways to create the container: 1) cf https://github.com/OpenSC/OpenSC/blob/master/src/minidriver/minidriver.c#L1925 if md_is_guid_as_id = true; the microsoft container name is used as the id 2) cf https://github.com/OpenSC/OpenSC/blob/master/src/minidriver/minidriver.c#L1936 if md_is_guid_as_label = true; the microsoft container name is used as the label 3) (default) cf https://github.com/OpenSC/OpenSC/blob/master/src/minidriver/minidriver.c#L1868 the card is created with the default label "TODO: key label" (the microsoft container name is not used) The problem is that when the container is loaded: 1) if the container name is set on the card cf https://github.com/OpenSC/OpenSC/blob/master/src/minidriver/minidriver.c#L1501 Note: I didn't find in the code a place where the container name is initialized 2) (default) cf https://github.com/OpenSC/OpenSC/blob/master/src/minidriver/minidriver.c#L1517 a guid is created => the initial container name is not found anymore => when the container is created in a process, then reloaded, it fails because the container name is different There are many ways to solve this problem: A) replace the "TODO key label" with a guid and use a conversion table stored statically. This way, the guid for 2) is replaced at the load time B) set md_is_guid_as_label as default for the read write card and keep the current way to the read only cards .... Can you give your opinion on this ? (the history about that, ...) regards, -- -- Vincent Le Toux My Smart Logon www.mysmartlogon.com |