Douglas E. Engert wrote:
I would to propose two sets of changes to the
./etc/opensc.conf.in file.
The first cleans up some PIV issues:
adding # piv to the list of supported internal driver names,
removing the # pkcs15emu = "PIV-II"; comment line,
adding the PIV-II to to the list of the builtin pkcs15
emulators to test.
sure
The second deals with the use of the max_send_size
and max_recv_size parameters, especially important if
you are trying to to use more then one type of card on the
same system.
opensc.conf sets these to 252 for the pcsc reader_driver,
but not any of the other reader_drivers.
The default is set in ctx.c from SC_APDU_CHOP_SIZE as 248.
(Is this some old holder over from some earlier readers?)
The values set for the reader then applies to *all* cards
that might be used on the system. card.c copies it to
card->max_send_size = reader->driver->max_send_size;
Many card card drivers will set their own limits
and change card->max_*_size if the max_*_size is
greater then the card can handle:
card-staros.c 128
card-atrust-acos.c 128
pkcs15-gemsafe.c 248
card-minicos 244
card-gpk.c multiple of 8
card-piv.c needs 256 before doing i/o but 0xffff during
emulation.
card-muscle 1024*64 but also has a MSC_MAX_SEND = 255
and MSC_MAX_APDU = 256.
The consistent thing to do would be to have the default set to
256, and comment out the max_*_sizes in opensc.conf
as all newer readers can handle this, as far as I know.
why 256 ? Extended APDUs could be larger .... Personally I've removed
the max_*_size lines from me config.
Then let each card driver reset it if it is larger then the
card can handle as most today today. A user with an older reader
could still set it lower in opensc.conf.
or change the config so that one add limit based on a certian
card ATR and / or a specific card driver.
Cheers,
Nils
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel