Closed rayanboulares closed 2 years ago
The opensc utility can list files (https://github.com/OpenSC/OpenSC/blob/master/src/tools/gids-tool.c#L370) but working on files and directories is a work to do.
the api from Microsoft is easier to address. You have once a card is identified to find the mini driver dll, then load and initialize it. You can then query the file api. For example using cardreadfile (https://docs.microsoft.com/en-us/previous-versions/windows/desktop/secsmart/cardreadfile)
I have been playing around with minidrivers this weekend. I found a C# wrapper for the minidriver and it worked fine (I can create and delete files and directories in your GIDS applet).
However, when I want to use raw Windows API I try to dumpbin /export
the msclmd.dll library (both in System32 and in WoW64) I only find one exported function : CardAcquireContext
. Is it normal? Even with OpenSC minidriver I only get this one symbol.
Where and how can I find and use all the other minidriver functions as defined in Cardmod.h
and Windows Minidriver specification?
Merci d'avance
CardAcquireContext(https://docs.microsoft.com/en-us/previous-versions/windows/desktop/secsmart/cardacquirecontext) returns a pointer to the other functions (https://docs.microsoft.com/en-us/previous-versions/windows/desktop/secsmart/card-data) They cannot be loaded using exports as usual.
Also you’d better read the mini driver specification (https://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/sc-minidriver_specs_V6-final.docx - may not be the latest)
It's much more clear now! Thank you Vincent.
Well, this is not an issue and this may not be the most appropriate place to ask.
Is it possible using available tools (Microsoft Minidriver or OpenSC PKCS*- suite tools) to create data objects on a GIDS card? It seems I can create a file under mscp/ folder using Gemalto Minidriver tool, but I can't read or write these files using OpenSC tools.
Thank you in advance.