Andreas Jellinghaus wrote:

+    /* need to limit to 248 */
+    if (card->max_send_size > 248)
+        card->max_send_size = 248;
+    if (card->max_recv_size > 248)
+        card->max_recv_size = 248;
+
+


can we put something like this in the generic code for
all cards and drivers? or in the openct specific code?

If the default was set to 256, then any card that could
not handle 256 could have some code like this. The problem
I ran into with PIV cards required the size to be 256,
as the card wanted to return data in 256 byte chunks.
But the GemSafe would fail if if the size was > 248.
So I could not use the same opensc.conf for both.


for example with cryptoflex card, openct, ccid driver (in openct)
some readers work, some won't as soon as I use 2048 bit keys.
with 1024 bit rsa they are all fine.
any suggeston where to place some code like this?
I would then re-test aöl readers I have access to
and see if it helps.

I don't know if this is a problem, but something to watch
out for is the way sc_card_t *card is created once, then
passed to the *_match_card routines of each driver, and to
the pkcs15emu_*  routines during card detection. If any of
these card routines reset any of the sc_card_t *card fields,
including the max_*_size the changes might get passed to the
next detection routine. Maybe the sc_card_t should be realocated
after each detection or some guidelines set as to what may be
changed and what may not duirng detection.


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



--

 Douglas E. Engert  <[EMAIL PROTECTED]>
 Argonne National Laboratory
 9700 South Cass Avenue
 Argonne, Illinois  60439
 (630) 252-5444
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to