RFR 8163251 : Hard coded loop limit prevents reading of smart card data greater than 8k

Ivan Gerasimov ivan.gerasimov at oracle.com
Mon Feb 10 23:49:23 UTC 2020


Hello!

Current implementation of the method 
javax.smartcardio.CardChannel.transmit() has an internal limitation on 
the maximum allowed amount of the transmitted data.

This limitation is dictated by the maximum number of iterations to 
transmit data from a card:  Each iteration can transmit up to 256 bytes 
of data, and we have a hardcoded limit of 32 iterations.

Over time, we've received requests to increase this limit, as there are 
occasions when the effective limit of 8k is not enough.

Would you please help review a proposal:  First, it is proposed to 
increase the default limit of iteration to 128 (so that up to 32k of 
data can be transmitted);  Second, the limit of iterations is made 
configurable via a System property.  This limit can be increased up to 
4096 (so that the total amount of transmitted data can be made up to 1m).

BUGURL: https://bugs.openjdk.java.net/browse/JDK-8163251
WEBREV: http://cr.openjdk.java.net/~igerasim/8163251/00/webrev/

If there is an agreement on the proposal, I'll file a CSR to document a 
new System property.

Thanks in advance!

-- 
With kind regards,
Ivan Gerasimov




More information about the security-dev mailing list