Skip to content

Commit

Permalink
fix tag 0x7F48 check
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Spierenburg authored and philipWendland committed Feb 8, 2017
1 parent 68be372 commit 77c3428
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/net/pwendland/javacard/pki/isoapplet/IsoApplet.java
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@ private void importPrivateKey(APDU apdu) throws ISOException {
recvLen = doChainingOrExtAPDU(apdu);

// Parse the outer tag.
if(ram_buf[offset] != (byte)0x7F && ram_buf[offset] != (byte)0x48) {
if(ram_buf[offset] != (byte)0x7F && ram_buf[(short)(offset+1)] != (byte)0x48) {
ISOException.throwIt(ISO7816.SW_WRONG_DATA);
}
offset += 2;
Expand Down

0 comments on commit 77c3428

Please sign in to comment.