On Tuesday, October 26 at 11:58AM, Peter Stuge wrote: > Juan Antonio Martinez wrote: > > An ideal solution for me (and for the other people that is working > > with SM cards) would be adding a new card operation > > "card_transmit_apdu()", that defaults in iso7816.c to > > sc_transmit_apdu(), but can be overriden when needed. > > I don't think this would be ideal, because it seems to me that it > would require duplicating a lot of code. Is that correct? > > Would it work to have SM encrypt and decrypt hooks instead, and keep > using as much existing code as possible? > > Drivers not using SM would not set hooks and nothing happens. > New drivers needing SM could provide functions to handle it. > In the slightly longer term, that SM code could be consolidated > and provided by OpenSC to all drivers maybe just by setting a flag. > > > //Peter
Juan's solution obviously only uses hooks, too. So not more overhead than with SM hooks. If a transmit hook wasn't set, simply use sc_transmit_apdu. Greets, Frank.
pgp5pPsS38yR9.pgp
Description: PGP signature
_______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel