roelderickx / connective-plugin-linux

A replacement for the Connective Plugin which is used on several websites to log in or sign documents using a card reader and an electronic identity card.
GNU General Public License v3.0
36 stars 2 forks source link

Cardreader without numpad errors #19

Closed exolyte closed 5 months ago

exolyte commented 6 months ago

I'm using a ACS ACR38U 00 00 cardreader and was getting the following error when trying to run commands that require pin authentication: stderr output from native app com.connective.signer: Failed to control Feature not supported.

I tracked the issue down to this function call features = self._connection.control(smartcard.scard.SCARD_CTL_CODE(3400), []) which is part of the smartcard library if I understand correctly.

I commented out self.__get_reader_features() and L511-530 and the commands worked just fine.

Since it started working I didn't really dig any deeper and I'm not sure if there's anything to fix for you, but I figured this might help some people.

roelderickx commented 6 months ago

Thanks for your report and glad to see you were able to work around the issue.

The part you commented is the test to detect if there is a numeric keypad on your cardreader or not. Your modification always shows the keypad on screen, which is a great default if the capabilities cannot be detected.

I'll modify it that way, but since it is not urgent it may take some time.

roelderickx commented 5 months ago

I added extra error handling but I didn't disable lines 511-530, that code will be skipped if the detection flags are all set to False.