Hello!
On Mar 20, 2010, at 21:48 , Martin Vogt wrote:
> Hello list,
> 
> the attachment contains an _experimental_ starcos 3 driver for
> opensc. Currently it only supports reading and directory changing,
> everything else is _really_ untested.
> (It may burn your house, or your card, or you reader)
> =>you have been warned :)
Nice to know.


> I don't know what is needed for a possible inclusion in opensc,
> but in the future this may be an option, if anyone is interested
> in this.
> (At this point, it's only a snapshot of my development tree.)
I think the first requirement would be to have a possibility to expose 
something (a key or a PIN) via PKCS#11 or pkcs15-tool --dump.

If the card is available from a public source in quantities <=10 (a web shop) 
so that anyone interested could buy it, there should be no restrictions other 
than readable and functioning code.

Otherwise, for a closed or restricted card, decent documentation on the card is 
required and a responsible maintainer contact for the drvier (which means that 
if the maintainer disappears the support for that card is "discontinued" in 
OpenSC until somebody picks it up).






> If you have a comment ("RFC") what is missing, should be improved
> etc... please post a reply.
Some small comments-questions:
 - you seem to have diffed it against 0.11 not trunk. sc_ctx_suppress_errors_* 
is long gone for good. 
 - please use the style guide 
http://www.opensc-project.org/opensc/wiki/DevelopmentPolicy#Source - at least 
use tabs and add a bit more whitespace to be more readable and more similar to 
the rest of OpenSC
 - don't use printf in libopensc/* - it is a library and should return a 
relevant return code instead and keep stdout/stderr clean unless requested to 
do so.
 - is the card very different from the older starcos 2.3 driver? If it would be 
small and simple, maybe a single starcos driver could do, with if-s for 
different versions. (have not compared the files yet, just asking)
 - do you have a manual for the card? Can you share it (add to the relevant 
wiki page for example)? If there is a manual that defines different bits to 
set, maybe re-create the constants by using bitwise operators instead of having 
a table of opaque constants (sc_algo2apdu table)


> I know, that writing support is missing in the driver, but
> up to now I haven't figured out how opensc and the pkcs15-init
> mechanism works...(I think I already locked up one card with
> writing, so you should definitely not try this)
True, this is a bit complicated. I hope we can have a small howto for new card 
drivers one day. I don't know the full story with PKCS#15 initialization 
either, I guess Viktor might be the best source for this information.


-- 
Martin Paljak
http://martin.paljak.pri.ee
+3725156495

_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to