Helloo
On Feb 3, 2010, at 09:09 , Andreas Jellinghaus wrote:
> * I think get_pin code interacting with the user should be in the
>  tools/ directory, not part of a shared library or pkcs#11 module.
>  so I seperated that code.
That's how it should be, yes.

> * I removed all the other unused functions.
> * ui.c/h has a shared library interface via opensc.conf, so you
>  can configure a plugin, it will load that plugin and use the
>  functions there instead of the build-in ones. 
>  noone uses that, as far as I know, thus I'm removing that indirection
>  for opensc (remember: only the log code uses one function for
>  printing messsages).
Can be removed, indeed.


> * for pkcs15-init I don't think such a code to use an alternate
>  implementation of get_pin in needed at all, so I remove the
>  indirections tool.
All tools should use the same pin input mechanisms.

> the result:
> 60 new lines of code in log.c, >400 lines in ui.c gone, ui.h gone.
> new files tools/ui.c and ui.h with 80 / 120 lines.
> 
> do you think the changes are ok so far? then I will commit them.
> 
> further changes to discuss:
> * most of the new code in log.c is the new use_color function.
>  can we remove that one? I'm no fan of the coloring code, it
>  causes more trouble than it is worth for me.
That would work if there debug code was better layered. I'm in favor of a 
verbose debug file if needed and no debug whatsoever if not needed.

> * since only pkcs15-init uses ui.c/h I would fold those files
>  into pkcs15-init instead of having new files.
I think that the UI piece can be removed. None of the tools I guess will in any 
near future grow a GUI capability and the only thing that's needed is to have 
some common code for PIN entry, like the card connection code in util.c


> if noone objects I will implement these changes too.

Nice.

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

_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to