[Pcsclite-muscle] PCSC 10 - Class 2

Michael StJohns mstjohns at comcast.net
Thu Feb 4 11:22:52 EST 2021


Hi -

I'm looking for guidance that appears to be missing from the PCSC part 
10 - specifically how ModifyPinStart/ModifyPinFinish/GetKeyPressed 
behave in the face of the normal, old pin/new pin/new pin again pattern 
for changing a pin.   It's not directly tied to pcsc-lite, but I figured 
since Ludovic had a hand in writing the specs....

Basically, I'd like to provide a pop up visual reference of what's 
happening on the key pad - e.g. a "*" for every key pressed, a message 
when the pin and new pin are entered for a pinpad without a display.

In a class 2 device with an LCD, I can specify that the Pinpad accepts 
up to three PIN entries (with associated messages) - Old Pin, New Pin 
and Confirm New Pin using ModifyPinDirect and display those on the LCD.  
I assume I can do that for ModifyPinStart as well on a class 2 Pinpad 
device without a display?

The question is, assuming I set bNumberMessage to 3, is what is the 
sequence of values I should see from FEATURE_GET_KEY_PRESSED and whether 
I should call FEATURE_ABORT at some point?

Let's pretend that the current pin is 1234 and that I want to change it 
to 4321 - what I think I should be seeing is something like the following:

0x2b - number key pressed - 1
0x2b - 2
0x00 - no key pressed (waiting)
0x2b - 4
0x08 - backspace - erase the 4
0x2b - 3
0x2b - 4
0x0d - OK button - old pin has been entered
0x00 - waiting
0x2b - 4
0x2b - 3
0x2b - 2
0x2b - 1
0x0d - OK Button pressed - new pin has been entered once
0x2b - 4
0x2b - 3
0x2b - 2
0x2b - 1
0x0d - OK Button pressed - new pin has been entered a second time
- at this point call FEATURE_MODIFY_PIN_FINISH

If I saw either of 0x1B or 0x40 or 0x0e I would call FEATURE_ABORT at 
that point and then return a fake RAPDU with the appropriate SW1SW2 to 
indicate the failure.

Does the above make sense or am I just going to have to find enough 
devices to try different approaches?

Thanks - Mike





More information about the pcsclite-muscle mailing list