Skip to content

Commit

Permalink
Don't allow INS_PUT_DATA without admin auth
Browse files Browse the repository at this point in the history
Fix #10
  • Loading branch information
Alex Wilson committed Sep 6, 2018
1 parent 736e1bb commit 1c7c9c1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/net/cooperi/pivapplet/PivApplet.java
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,12 @@ public class PivApplet extends Applet implements ExtendedLength
return;
}

if (!slot9b.flags[PivSlot.F_UNLOCKED]) {
ISOException.throwIt(
ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
return;
}

if (tlv.tagLength() == (short)3 &&
tlv.readByte() == (byte)0x5F &&
tlv.readByte() == (byte)0xC1) {
Expand Down

0 comments on commit 1c7c9c1

Please sign in to comment.