Hello,

Nice! (Comments inline)

On Sep 17, 2010, at 3:03 PM, Andre Zepezauer wrote:
> I would like to propose the following simplification of the internal
> 'struct sc_pkcs15_card'.
...
> The main difference to the current definition is, that everything that
> belongs to tokeninfo would be accessible through p15card->tokeninfo. In
> my opinion, grouping all tokeninfo related attributes under
> p15card->tokeninfo better reflects the meaning of these attributes.
> 
> The purpose of this redefinition is maintains only and can be seen as a
> follow up to changeset [2872][1] by Ludovic Rousseau, who introduced the
> dedicated structure sc_pkcs15_tokeninfo_t. And since the upcoming 0.12
> release will break (internal) pkcs15 API anyway, inclusion of this
> modification should not harm. I will prepare the patch, if reception of
> this proposal is positive.

Yes, please do.

> 2. the attribute 'flags' is overused, because it holds flags from two
> completely different domains (pkcs15 and internal flags mixed) [4][5]
This should be fixed, hopefully such overloading will not happen again.

> 3. use_file_cache, use_pin_cache are actually flags and could be defined
> as such
I'm not sure the flags can be set individually from the configuration file for 
a specific card, rather they are "PKCS#15" options, which don't have to be 
treated as card flags.

> 5. OpenSC source code is almost uncommented, therefore over complex data
> structures should be avoided

It would be good to fix this. Doxygen or something similar might help, but as 
the API is internal, something as simple as *something* for undocumented 
functions would be nice to have.
-- 
Martin Paljak
@martinpaljak.net
+3725156495

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

Reply via email to