wangjin / seek-for-android

Automatically exported from code.google.com/p/seek-for-android
0 stars 0 forks source link

Channel.selectNext() is not fully compliance with OpenMobile 2.04 #75

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
according to Java Doc at 
http://seek-for-android.googlecode.com/svn/trunk/doc/org/simalliance/openmobilea
pi/Channel.html#selectNext()

selectNext can throw the following Exception:
IOException - if there is a communication problem to the reader or the Secure 
Element.
IllegalStateException - if the channel is used after being closed or it is not 
connected.
SecurityException - if the command is filtered by the security policy

While SecurityException is not document in OpenMobile 2.04, it is an OK 
behavior assuming Access Control Enforcer can be enforced correctly during the 
selectNext() call (which based on how AC enforcer is implemented currently, it 
could be an issue, but that would be another error).

However, SEEK is missing one possible Exception based on OpenMobile 2.04 for 
selectNext():
OperationNotSupportedError - if this operation is not supported

This is actually quick important, because:
1) UICC might not support openBasicChannel or openLogicalChannel against 
Partial AID, in such case, selectNext() might fail.
2) if openBasicChannel and openLogicalChannel against Partial AID is supported 
by SEEK and target UICC, it might not be possible to enforce Access Control 
correctly (as selectNext would not know about result AID in order to enforce 
the exact rule).

Hence, the SEEK documentation as well as implementation should be update to 
handle it.

Original issue reported on code.google.com by tommypo...@gmail.com on 9 Jan 2014 at 6:36