Hello,
On Aug 15, 2010, at 1:56 PM, Emanuele Pucciarelli wrote:
> I have uploaded a new, updated patch for Italian CNS support against
> the current trunk:
> 
> http://www.opensc-project.org/opensc/attachment/ticket/177/itacns-patch3.diff

Great! IMO that's good to go, I have only one small comment:
 * Do I miss something or does the itacns_compute_signature -> 
do_compute_signature chain translate almost 1:1 to iso7816_compute_signature 
with an additional check in itacns_compute_signature ?
 * The same seems to apply for itacns_decipher -> do_decipher and 
iso7816_decipher

iso7816.c should not be taken as a final, static code, if there are checks 
missing from there, it is OK to improve iso7816.c as well :)


> Now all Secure Messaging bits are completely out (I'm working on that
> separately) and there is only a tiny bit of dead code in apdu.c – I'm
> unsure how to deal with that. The check *should* be there for short
> Case 3 APDU's, but I can see no way to disable that only for Italian
> CNS cards without fundamental changes to apdu.c (i.e. something like a
> sc_trasnmit_apdu_without_check() function, or a "purposefully broken
> APDU" flag in the sc_apdu_t structure).

I guess #237 would solve the problem almost cleanly for you. 

I remember a similar problem with Estonian ID card but after some digging in 
the specs and card manual it turned out to be somewhat sensible (Maybe 
something like 0x00 Le indicating "give me as much as you have", like in 
deciphering comments) but I can't locate the details nor changesets about it 
now.

javax.smartcardio also does APDU mangling and it is not possible to send such 
APDU-s, as it eats away the final zero...


> Thank you in advance for any comment/feedback. I'm looking forward to
> getting this into shape for integration in trunk.


[1] http://www.opensc-project.org/opensc/ticket/237
-- 
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