Skip to content

Commit

Permalink
Satochip-Applet v0.12-0.6: patch #11 (spurious select issue)
Browse files Browse the repository at this point in the history
see #11
  • Loading branch information
Toporin committed Dec 6, 2023
1 parent c3baeb6 commit 08b2fa2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/org/satochip/applet/CardEdge.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ public class CardEdge extends javacard.framework.Applet {
// 0.12-0.3: SeedKeeper support: label & labelsize no longer required
// 0.12-0.4: add reset to factory support
// 0.12-0.5: add support for personalisation PKI
// 0.12-0.6: patch spurious select issue
private final static byte PROTOCOL_MAJOR_VERSION = (byte) 0;
private final static byte PROTOCOL_MINOR_VERSION = (byte) 12;
private final static byte APPLET_MAJOR_VERSION = (byte) 0;
private final static byte APPLET_MINOR_VERSION = (byte) 5;
private final static byte APPLET_MINOR_VERSION = (byte) 6;

// Maximum number of keys handled by the Cardlet
private final static byte MAX_NUM_KEYS = (byte) 16;
Expand Down Expand Up @@ -613,7 +614,8 @@ public void process(APDU apdu) {
byte[] buffer = apdu.getBuffer();
// check SELECT APDU command
if ((buffer[ISO7816.OFFSET_CLA] == 0) && (buffer[ISO7816.OFFSET_INS] == (byte) 0xA4))
return;
ISOException.throwIt(ISO7816.SW_FILE_NOT_FOUND); // spurious select (see https://github.com/Toporin/SatochipApplet/issues/11)

// verify the rest of commands have the
// correct CLA byte, which specifies the
// command structure
Expand Down

0 comments on commit 08b2fa2

Please sign in to comment.