opensc is written for pkcs#15 cards - they have a file "3f002f00" and a directory "3f005015" and several files in that directory describing, what is on the card (index files, for example an index file listing all certificates, their subjects and metadata, the filename etc.).
so if you want your card to work 100% with opensc, you need to implement initialization - a way that opensc can create all these files and store all that information - and later using all the stuff on the cards (e.g. with rsa keys: signing and decryption by the card). if you aim for less, you can write a pkcs#15 emulation driver: it creates all these pkcs#15 structures in memory, and fakes a real card. then only stuff referenced by the in-memory driver, but not faked is really on the card and opensc will try to read that. for example such an emulation could fake all structures, but read the X.509 certificate from the card. or pass rsa sign/decrypt commands to the card (and pin verification etc. of course). > One last question : is there some kind of a howto to add support for a new > smartcard to opensc? I'm sorry, I think there is none. the problem is, there are many different smart cards: * national id cards (no changes possible) * cards in pkcs#15 format (but initialized by other software - we can only use, but not change them) * cards with non pkcs#15 formats (we can only use emulation) * full blank cards with file-systems (so we can format them, create pkcs#15 structures and fully use them) * java cards with applets - each applet has other features and a different interface and thus needs its own driver if you know what you want to do, we can point you to existing, well working code as reference, and answer specific questions. hope this helps. Regards, Andreas _______________________________________________ opensc-devel mailing list [email protected] http://www.opensc-project.org/mailman/listinfo/opensc-devel
