JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html
https://ftsafe.en.alibaba.com/index.html
Setting Response in SELECT command
Setting Response in SELECT command
Hello Sir,
I am unable to set response in the SELECT command,can any one help me out.
Regards,
Naresh
I am unable to set response in the SELECT command,can any one help me out.
Regards,
Naresh
-
- Posts: 35
- Joined: Wed Jun 20, 2018 4:06 am
- Points :218
- Contact:
Re: Setting Response in SELECT command
If you have an applet on javacard. the javacard cos perhaps had processed the select command and the command is err or no compatible withe the standard special. So the applet can't receive the select command and the response of this command cannot be send to the off-card.
If you have an applet and the applet receive the select command. the applet can put the response data in the function:select() or process(). These functions are standard API. eg:
public void process(APDU apdu) {
if (selectingApplet()) {
byte[] apduBuf = apdu.getBuffer();
short rspLen = (short) selectResponse.length;
Util.arrayCopyNonAtomic(selectResponse, (short) 0, apduBuf, (short) 0, rspLen);
apdu.setOutgoingAndSend((short) 0, rspLen);
return;
}
...
}
If you have an applet and the applet receive the select command. the applet can put the response data in the function:select() or process(). These functions are standard API. eg:
public void process(APDU apdu) {
if (selectingApplet()) {
byte[] apduBuf = apdu.getBuffer();
short rspLen = (short) selectResponse.length;
Util.arrayCopyNonAtomic(selectResponse, (short) 0, apduBuf, (short) 0, rspLen);
apdu.setOutgoingAndSend((short) 0, rspLen);
return;
}
...
}
Who is online
Users browsing this forum: No registered users and 65 guests