Throw an error for incorrect CLAs
This commit is contained in:
parent
22b11b1ee8
commit
995ba68bdf
1 changed files with 33 additions and 29 deletions
|
@ -52,6 +52,9 @@ public class MyApplet extends Applet {
|
|||
short length;
|
||||
byte[] buffer = apdu.getBuffer();
|
||||
|
||||
if (buffer[ISO7816.OFFSET_CLA] != 0x80) {
|
||||
ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
|
||||
} else {
|
||||
byte instruction = buffer[ISO7816.OFFSET_INS];
|
||||
|
||||
switch (instruction) {
|
||||
|
@ -87,4 +90,5 @@ public class MyApplet extends Applet {
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue