TestApplet: include object deletion test

This commit is contained in:
Arnaud Fontaine
2021-12-20 15:02:15 +01:00
parent 1720a3494b
commit c2d7070f2d
3 changed files with 25 additions and 4 deletions

View File

@@ -341,6 +341,13 @@ public final class TestApplet extends Applet {
}
}
private final void processDeletion() {
if(!JCSystem.isObjectDeletionSupported()) {
ISOException.throwIt(Data.SW_DELETION_NOT_SUPPORTED);
}
JCSystem.requestObjectDeletion();
}
public final void process(final APDU apdu) {
final byte[] apdubuf = apdu.getBuffer();
@@ -376,6 +383,10 @@ public final class TestApplet extends Applet {
}
break;
case Data.INS_TEST_DELETION:
processDeletion();
break;
default:
ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
return;