Page 1 of 1

how to set status of apdu command

Posted: Tue Jul 03, 2018 1:06 am
by naresh
Hello sir,
Any one help me how to set the status of apdu command.
Regards,
Thammineni Naresh.

Re: how to set status of apdu command

Posted: Tue Jul 03, 2018 3:04 am
by newbiecat
"ISOException.throwIt". The prototype of the method see the following.

Code: Select all

public static void throwIt(short sw)

Re: how to set status of apdu command

Posted: Mon Jul 23, 2018 5:50 am
by happy123654
If you want to set the status of APDU command. there are two situations:
1. the status equals to 0x9000, you set nothing because the JVCOS will help the applet to set the status.
2. the status means the exception or the private implication. you can use the ISOException.throwIt(status) to set the status.

Re: how to set status of apdu command

Posted: Mon Jul 23, 2018 9:42 pm
by scplatform
The underlying JCVM implementation first sends the response data and then checks the status word of SW1 SW2. If SW is an internal exception to JCRE / JCVM, 6700 will normally be thrown. If SW is not equal to 9000, the exception specified by the application is thrown.