uunicorn / python-validity

Validity fingerprint sensor prototype
MIT License
995 stars 83 forks source link

Finger names supplied to ListEnrolledFingers in DBus API are incorrect #116

Closed espidev closed 2 years ago

espidev commented 2 years ago

Hi, It seems when ListEnrolledFingers is called, we are getting finger names such as "WINBIO_ANSI_381_POS_RH_INDEX_FINGER". The fprint API spec specifies that finger names should be of the following form: https://fprint.freedesktop.org/fprintd-dev/Device.html#fingerprint-names. So mapped to "right-index-finger" instead.

Downstream issue, fingers not listing in Plasma's fingerprint dialog: https://bugs.kde.org/show_bug.cgi?id=450859

baschi29 commented 2 years ago

I took a quick look at the source code and this seems to be intentional to comply with the microsoft specification: https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-ansi-381-pos-fingerprint-constants

Relevant Code: https://github.com/uunicorn/python-validity/blob/master/dbus_service/dbus-service#L143-L147

I don't know if this is neccessary for the sensors to function or if this was choosen for windows interopability. Would be great if somebody could answer that, I could provide a solution afterwards.

espidev commented 2 years ago

I mean sure it can be used internally but this is the dbus api we're talking about, which is used by applications.