Refactor format of the MyApplet.java
file
This commit is contained in:
parent
6070b53cdf
commit
88dc8bb094
1 changed files with 52 additions and 51 deletions
|
@ -55,6 +55,7 @@ public class MyApplet extends Applet {
|
||||||
|
|
||||||
public boolean select() {
|
public boolean select() {
|
||||||
if (pin.getTriesRemaining() == 0) {
|
if (pin.getTriesRemaining() == 0) {
|
||||||
|
ISOException.throwIt(SW_VERIFICATION_FAILED);
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return super.select();
|
return super.select();
|
||||||
|
@ -86,8 +87,8 @@ public class MyApplet extends Applet {
|
||||||
byte instruction = buffer[ISO7816.OFFSET_INS];
|
byte instruction = buffer[ISO7816.OFFSET_INS];
|
||||||
|
|
||||||
switch (instruction) {
|
switch (instruction) {
|
||||||
case 0x04:
|
|
||||||
case 0x02:
|
case 0x02:
|
||||||
|
case 0x04:
|
||||||
authenticationRequired = !pin.isValidated();
|
authenticationRequired = !pin.isValidated();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue