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;
|
short length;
|
||||||
byte[] buffer = apdu.getBuffer();
|
byte[] buffer = apdu.getBuffer();
|
||||||
|
|
||||||
|
if (buffer[ISO7816.OFFSET_CLA] != 0x80) {
|
||||||
|
ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
|
||||||
|
} else {
|
||||||
byte instruction = buffer[ISO7816.OFFSET_INS];
|
byte instruction = buffer[ISO7816.OFFSET_INS];
|
||||||
|
|
||||||
switch (instruction) {
|
switch (instruction) {
|
||||||
|
@ -88,3 +91,4 @@ public class MyApplet extends Applet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue