arekinath/PivApplet

INS_RESET does not reset PIN policy

Closed this issue · 3 comments

Hi, is there a specific reason why the PivApplet.processReset() method does not reset slot-specific PIN policies to their default values on INS_RESET? Or is it a bug?

I would expect something like this to be present:

slots[SLOT_9A].pinPolicy = PivSlot.P_ONCE;
slots[SLOT_9C].pinPolicy = PivSlot.P_ALWAYS;
slots[SLOT_9D].pinPolicy = PivSlot.P_ONCE;
slots[SLOT_9E].pinPolicy = PivSlot.P_NEVER;
for (byte i = SLOT_82; i <= SLOT_8C; ++i)
    slots[i].pinPolicy = PivSlot.P_ONCE;

Looks like a bug to me. Thanks for pointing it out, I'll try to get a fix in for it at some point.

Great, thanks for the fix! Are you planning on creating a new release, please?

Released in v0.9.0 now