Hi,

I propose to change slightly the prototypes of the sc_pkcs15init_operations procedures,
(excluding maybe 'erase_card', 'init_card', ),
and to pass the 'sc_pkcs15_card' argument instead of 'sc_card' .


For ex. to change
int (*create_key)(sc_profile_t *, sc_card_t *, sc_pkcs15_object_t *)
for
int (*create_key)(sc_profile_t *, sc_pkcs15_card_t *, sc_pkcs15_object_t *)
.


The motivations are:

- the card specific pkcs15init part will get access to the total pkcs15 contents and will be able to do more of the card specific non-pkcs15 tasks (in perspective the pkcs15init emulation);

- it will help to replace the existing static sc_keycache system by the cache in 'sc_pkcs15_card' (as Martin proposed);

- imho, it's quite logical: to pass 'sc_card' at libopensc level, and 'sc_pkcs15_card' at the pkcs15init;

- it will not harm the existing card drivers.


Sure, one can tell that card specific part can access the sc_pkcs15_card through the profile->p15_spec,
but, imho, direct manner looks better.


Kind wishes,
Viktor.



--
Viktor Tarasov  <[email protected]>

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

Reply via email to