mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
Compare commits
11 Commits
mincrmatt1
...
v1.94.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fad2652ee | ||
|
|
6f5ba3cbb5 | ||
|
|
754ccfb865 | ||
|
|
d3014f1684 | ||
|
|
3568051686 | ||
|
|
9ce6ed4164 | ||
|
|
e0fd178bec | ||
|
|
168ab98021 | ||
|
|
ae5696a9bb | ||
|
|
038c7108a6 | ||
|
|
eb1013cdb6 |
10
NEWS
10
NEWS
@@ -1,6 +1,16 @@
|
|||||||
This file lists notable changes in each release. For the full history of all
|
This file lists notable changes in each release. For the full history of all
|
||||||
changes, see ChangeLog.
|
changes, see ChangeLog.
|
||||||
|
|
||||||
|
2021-11-02: v1.94.3 release
|
||||||
|
|
||||||
|
Highlights:
|
||||||
|
* Ensure idle mainloop before completing enumeration (fprintd#119)
|
||||||
|
* It is now possible to extend already enrolled prints
|
||||||
|
* elanspi: Fix timeout error with some hardware (#438)
|
||||||
|
* elanspi: Fix cancellation issues
|
||||||
|
* goodixmoc: Return matching device print; fixes duplicate checking (#444)
|
||||||
|
* goodixmoc: Support clearing the storage (usually unused)
|
||||||
|
|
||||||
2021-11-02: v1.94.2 release
|
2021-11-02: v1.94.2 release
|
||||||
|
|
||||||
Highlights:
|
Highlights:
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
libfprint
|
# libfprint
|
||||||
=========
|
|
||||||
|
|
||||||
libfprint is part of the fprint project:
|
libfprint is part of the fprint project:
|
||||||
https://fprint.freedesktop.org/
|
https://fprint.freedesktop.org/
|
||||||
|
|
||||||
|
## History
|
||||||
|
|
||||||
libfprint was originally developed as part of an academic project at the
|
libfprint was originally developed as part of an academic project at the
|
||||||
University of Manchester with the aim of hiding differences between different
|
University of Manchester with the aim of hiding differences between different
|
||||||
consumer fingerprint scanners and providing a single uniform API to application
|
consumer fingerprint scanners and providing a single uniform API to application
|
||||||
@@ -15,6 +16,8 @@ from this one, although I try to keep them as similar as possible (I'm not
|
|||||||
hiding anything in the academic branch, it's just the open source release
|
hiding anything in the academic branch, it's just the open source release
|
||||||
contains some commits excluded from the academic project).
|
contains some commits excluded from the academic project).
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
THE UNIVERSITY OF MANCHESTER DOES NOT ENDORSE THIS THIS SOFTWARE RELEASE AND
|
THE UNIVERSITY OF MANCHESTER DOES NOT ENDORSE THIS THIS SOFTWARE RELEASE AND
|
||||||
IS IN NO WAY RESPONSIBLE FOR THE CODE CONTAINED WITHIN, OR ANY DAMAGES CAUSED
|
IS IN NO WAY RESPONSIBLE FOR THE CODE CONTAINED WITHIN, OR ANY DAMAGES CAUSED
|
||||||
BY USING OR DISTRIBUTING THE SOFTWARE. Development does not happen on
|
BY USING OR DISTRIBUTING THE SOFTWARE. Development does not happen on
|
||||||
30
TODO
30
TODO
@@ -1,30 +0,0 @@
|
|||||||
LIBRARY
|
|
||||||
=======
|
|
||||||
test suite against NFIQ compliance set
|
|
||||||
make library optionally asynchronous and maybe thread-safe
|
|
||||||
nbis cleanups
|
|
||||||
API function to determine if img device supports uncond. capture
|
|
||||||
race-free way of saying "save this print but don't overwrite"
|
|
||||||
|
|
||||||
NEW DRIVERS
|
|
||||||
===========
|
|
||||||
Sunplus 895 driver
|
|
||||||
AES3400/3500 driver
|
|
||||||
ID Mouse driver
|
|
||||||
Support for 2nd generation MS devices
|
|
||||||
Support for 2nd generation UPEK devices
|
|
||||||
|
|
||||||
IMAGING
|
|
||||||
=======
|
|
||||||
ignore first frame or two with aes2501
|
|
||||||
aes2501: increase threshold "sum" for end-of-image detection
|
|
||||||
aes2501 gain calibration
|
|
||||||
aes4000 gain calibration
|
|
||||||
aes4000 resampling
|
|
||||||
PPMM parameter to get_minutiae seems to have no effect
|
|
||||||
nbis minutiae should be stored in endian-independent format
|
|
||||||
|
|
||||||
PORTABILITY
|
|
||||||
===========
|
|
||||||
OpenBSD can't do -Wshadow or visibility
|
|
||||||
OpenBSD: add compat codes for ENOTSUP ENODATA and EPROTO
|
|
||||||
@@ -181,7 +181,6 @@ usb:v06CBp00DF*
|
|||||||
usb:v06CBp00F9*
|
usb:v06CBp00F9*
|
||||||
usb:v06CBp00FC*
|
usb:v06CBp00FC*
|
||||||
usb:v06CBp00C2*
|
usb:v06CBp00C2*
|
||||||
usb:v06CBp00C9*
|
|
||||||
usb:v06CBp0100*
|
usb:v06CBp0100*
|
||||||
usb:v06CBp00F0*
|
usb:v06CBp00F0*
|
||||||
usb:v06CBp0103*
|
usb:v06CBp0103*
|
||||||
@@ -268,15 +267,19 @@ usb:v06CBp008A*
|
|||||||
usb:v06CBp009A*
|
usb:v06CBp009A*
|
||||||
usb:v06CBp009B*
|
usb:v06CBp009B*
|
||||||
usb:v06CBp00A2*
|
usb:v06CBp00A2*
|
||||||
|
usb:v06CBp00A8*
|
||||||
usb:v06CBp00B7*
|
usb:v06CBp00B7*
|
||||||
usb:v06CBp00BB*
|
usb:v06CBp00BB*
|
||||||
usb:v06CBp00BE*
|
usb:v06CBp00BE*
|
||||||
usb:v06CBp00C4*
|
usb:v06CBp00C4*
|
||||||
usb:v06CBp00CB*
|
usb:v06CBp00CB*
|
||||||
|
usb:v06CBp00C9*
|
||||||
usb:v06CBp00D8*
|
usb:v06CBp00D8*
|
||||||
usb:v06CBp00DA*
|
usb:v06CBp00DA*
|
||||||
|
usb:v06CBp00DC*
|
||||||
usb:v06CBp00E7*
|
usb:v06CBp00E7*
|
||||||
usb:v06CBp00E9*
|
usb:v06CBp00E9*
|
||||||
|
usb:v06CBp00FD*
|
||||||
usb:v0A5Cp5801*
|
usb:v0A5Cp5801*
|
||||||
usb:v0A5Cp5805*
|
usb:v0A5Cp5805*
|
||||||
usb:v0A5Cp5834*
|
usb:v0A5Cp5834*
|
||||||
@@ -288,6 +291,7 @@ usb:v0A5Cp5844*
|
|||||||
usb:v0A5Cp5845*
|
usb:v0A5Cp5845*
|
||||||
usb:v0BDAp5812*
|
usb:v0BDAp5812*
|
||||||
usb:v10A5p0007*
|
usb:v10A5p0007*
|
||||||
|
usb:v10A5p9200*
|
||||||
usb:v1188p9545*
|
usb:v1188p9545*
|
||||||
usb:v138Ap0007*
|
usb:v138Ap0007*
|
||||||
usb:v138Ap003A*
|
usb:v138Ap003A*
|
||||||
@@ -305,6 +309,7 @@ usb:v1491p0088*
|
|||||||
usb:v16D1p1027*
|
usb:v16D1p1027*
|
||||||
usb:v1C7Ap0300*
|
usb:v1C7Ap0300*
|
||||||
usb:v1C7Ap0575*
|
usb:v1C7Ap0575*
|
||||||
|
usb:v1C7Ap0576*
|
||||||
usb:v27C6p5042*
|
usb:v27C6p5042*
|
||||||
usb:v27C6p5110*
|
usb:v27C6p5110*
|
||||||
usb:v27C6p5117*
|
usb:v27C6p5117*
|
||||||
@@ -324,7 +329,9 @@ usb:v27C6p55A2*
|
|||||||
usb:v27C6p55A4*
|
usb:v27C6p55A4*
|
||||||
usb:v27C6p55B4*
|
usb:v27C6p55B4*
|
||||||
usb:v27C6p5740*
|
usb:v27C6p5740*
|
||||||
|
usb:v27C6p5E0A*
|
||||||
usb:v2808p9338*
|
usb:v2808p9338*
|
||||||
|
usb:v298Dp2020*
|
||||||
usb:v298Dp2033*
|
usb:v298Dp2033*
|
||||||
usb:v3538p0930*
|
usb:v3538p0930*
|
||||||
ID_AUTOSUSPEND=1
|
ID_AUTOSUSPEND=1
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ on_identify_cb (FpDevice *dev, FpPrint *match, FpPrint *print,
|
|||||||
if (match)
|
if (match)
|
||||||
{
|
{
|
||||||
g_autoptr(FpPrint) matched_print = g_object_ref (match);
|
g_autoptr(FpPrint) matched_print = g_object_ref (match);
|
||||||
|
const GDate *date;
|
||||||
char date_str[128] = {};
|
char date_str[128] = {};
|
||||||
|
|
||||||
identify_data->ret_value = EXIT_SUCCESS;
|
identify_data->ret_value = EXIT_SUCCESS;
|
||||||
@@ -155,7 +156,8 @@ on_identify_cb (FpDevice *dev, FpPrint *match, FpPrint *print,
|
|||||||
matched_print = g_steal_pointer (&stored_print);
|
matched_print = g_steal_pointer (&stored_print);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fp_print_get_enroll_date (matched_print))
|
date = fp_print_get_enroll_date (matched_print);
|
||||||
|
if (date && g_date_valid (date))
|
||||||
g_date_strftime (date_str, G_N_ELEMENTS (date_str), "%Y-%m-%d\0",
|
g_date_strftime (date_str, G_N_ELEMENTS (date_str), "%Y-%m-%d\0",
|
||||||
fp_print_get_enroll_date (matched_print));
|
fp_print_get_enroll_date (matched_print));
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ on_list_completed (FpDevice *dev,
|
|||||||
finger_to_string (fp_print_get_finger (print)),
|
finger_to_string (fp_print_get_finger (print)),
|
||||||
fp_print_get_username (print));
|
fp_print_get_username (print));
|
||||||
|
|
||||||
if (date)
|
if (date && g_date_valid (date))
|
||||||
{
|
{
|
||||||
g_date_strftime (buf, G_N_ELEMENTS (buf), "%Y-%m-%d\0", date);
|
g_date_strftime (buf, G_N_ELEMENTS (buf), "%Y-%m-%d\0", date);
|
||||||
g_print (", enrolled on %s", buf);
|
g_print (", enrolled on %s", buf);
|
||||||
|
|||||||
@@ -130,10 +130,12 @@ on_match_cb (FpDevice *dev, FpPrint *match, FpPrint *print,
|
|||||||
|
|
||||||
if (match)
|
if (match)
|
||||||
{
|
{
|
||||||
char date_str[128];
|
const GDate *date = fp_print_get_enroll_date (match);
|
||||||
|
char date_str[128] = "<unknown>";
|
||||||
|
|
||||||
verify_data->ret_value = EXIT_SUCCESS;
|
verify_data->ret_value = EXIT_SUCCESS;
|
||||||
|
|
||||||
|
if (date && g_date_valid (date))
|
||||||
g_date_strftime (date_str, G_N_ELEMENTS (date_str), "%Y-%m-%d\0",
|
g_date_strftime (date_str, G_N_ELEMENTS (date_str), "%Y-%m-%d\0",
|
||||||
fp_print_get_enroll_date (match));
|
fp_print_get_enroll_date (match));
|
||||||
g_debug ("Match report: device %s matched finger %s successifully "
|
g_debug ("Match report: device %s matched finger %s successifully "
|
||||||
|
|||||||
@@ -31,10 +31,9 @@
|
|||||||
#define ELAN_0907 (1 << 0)
|
#define ELAN_0907 (1 << 0)
|
||||||
#define ELAN_0C03 (1 << 1)
|
#define ELAN_0C03 (1 << 1)
|
||||||
#define ELAN_0C42 (1 << 2)
|
#define ELAN_0C42 (1 << 2)
|
||||||
#define ELAN_0C3D (1 << 3)
|
|
||||||
|
|
||||||
/* devices which don't require frame rotation before assembling */
|
/* devices which don't require frame rotation before assembling */
|
||||||
#define ELAN_NOT_ROTATED (ELAN_0C03 | ELAN_0C3D)
|
#define ELAN_NOT_ROTATED ELAN_0C03
|
||||||
|
|
||||||
/* min FW version that supports calibration */
|
/* min FW version that supports calibration */
|
||||||
#define ELAN_MIN_CALIBRATION_FW 0x0138
|
#define ELAN_MIN_CALIBRATION_FW 0x0138
|
||||||
@@ -214,7 +213,7 @@ static const FpIdEntry elan_id_table[] = {
|
|||||||
{.vid = ELAN_VEND_ID, .pid = 0x0c31, .driver_data = ELAN_ALL_DEV},
|
{.vid = ELAN_VEND_ID, .pid = 0x0c31, .driver_data = ELAN_ALL_DEV},
|
||||||
{.vid = ELAN_VEND_ID, .pid = 0x0c32, .driver_data = ELAN_ALL_DEV},
|
{.vid = ELAN_VEND_ID, .pid = 0x0c32, .driver_data = ELAN_ALL_DEV},
|
||||||
{.vid = ELAN_VEND_ID, .pid = 0x0c33, .driver_data = ELAN_ALL_DEV},
|
{.vid = ELAN_VEND_ID, .pid = 0x0c33, .driver_data = ELAN_ALL_DEV},
|
||||||
{.vid = ELAN_VEND_ID, .pid = 0x0c3d, .driver_data = ELAN_0C3D},
|
{.vid = ELAN_VEND_ID, .pid = 0x0c3d, .driver_data = ELAN_ALL_DEV},
|
||||||
{.vid = ELAN_VEND_ID, .pid = 0x0c42, .driver_data = ELAN_0C42},
|
{.vid = ELAN_VEND_ID, .pid = 0x0c42, .driver_data = ELAN_0C42},
|
||||||
{.vid = ELAN_VEND_ID, .pid = 0x0c4d, .driver_data = ELAN_ALL_DEV},
|
{.vid = ELAN_VEND_ID, .pid = 0x0c4d, .driver_data = ELAN_ALL_DEV},
|
||||||
{.vid = ELAN_VEND_ID, .pid = 0x0c4f, .driver_data = ELAN_ALL_DEV},
|
{.vid = ELAN_VEND_ID, .pid = 0x0c4f, .driver_data = ELAN_ALL_DEV},
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ fp_cmd_receive_cb (FpiUsbTransfer *transfer,
|
|||||||
{
|
{
|
||||||
fpi_ssm_mark_failed (transfer->ssm,
|
fpi_ssm_mark_failed (transfer->ssm,
|
||||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||||
"Corrupted message received"));
|
"Corrupted message header received"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -420,12 +420,9 @@ fp_verify_cb (FpiDeviceGoodixMoc *self,
|
|||||||
gxfp_cmd_response_t *resp,
|
gxfp_cmd_response_t *resp,
|
||||||
GError *error)
|
GError *error)
|
||||||
{
|
{
|
||||||
g_autoptr(GPtrArray) templates = NULL;
|
|
||||||
FpDevice *device = FP_DEVICE (self);
|
FpDevice *device = FP_DEVICE (self);
|
||||||
FpPrint *match = NULL;
|
FpPrint *new_scan = NULL;
|
||||||
FpPrint *print = NULL;
|
FpPrint *matching = NULL;
|
||||||
gint cnt = 0;
|
|
||||||
gboolean find = false;
|
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
@@ -434,46 +431,34 @@ fp_verify_cb (FpiDeviceGoodixMoc *self,
|
|||||||
}
|
}
|
||||||
if (resp->verify.match)
|
if (resp->verify.match)
|
||||||
{
|
{
|
||||||
match = fp_print_from_template (self, &resp->verify.template);
|
new_scan = fp_print_from_template (self, &resp->verify.template);
|
||||||
|
|
||||||
if (fpi_device_get_current_action (device) == FPI_DEVICE_ACTION_VERIFY)
|
if (fpi_device_get_current_action (device) == FPI_DEVICE_ACTION_VERIFY)
|
||||||
{
|
{
|
||||||
templates = g_ptr_array_sized_new (1);
|
fpi_device_get_verify_data (device, &matching);
|
||||||
fpi_device_get_verify_data (device, &print);
|
if (!fp_print_equal (matching, new_scan))
|
||||||
g_ptr_array_add (templates, print);
|
matching = NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
GPtrArray *templates = NULL;
|
||||||
fpi_device_get_identify_data (device, &templates);
|
fpi_device_get_identify_data (device, &templates);
|
||||||
g_ptr_array_ref (templates);
|
|
||||||
}
|
|
||||||
for (cnt = 0; cnt < templates->len; cnt++)
|
|
||||||
{
|
|
||||||
print = g_ptr_array_index (templates, cnt);
|
|
||||||
|
|
||||||
if (fp_print_equal (print, match))
|
for (gint i = 0; i < templates->len; i++)
|
||||||
{
|
{
|
||||||
find = true;
|
if (fp_print_equal (g_ptr_array_index (templates, i), new_scan))
|
||||||
|
{
|
||||||
|
matching = g_ptr_array_index (templates, i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (find)
|
|
||||||
{
|
|
||||||
if (fpi_device_get_current_action (device) == FPI_DEVICE_ACTION_VERIFY)
|
|
||||||
fpi_device_verify_report (device, FPI_MATCH_SUCCESS, match, error);
|
|
||||||
else
|
|
||||||
fpi_device_identify_report (device, print, match, error);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!find)
|
|
||||||
{
|
|
||||||
if (fpi_device_get_current_action (device) == FPI_DEVICE_ACTION_VERIFY)
|
if (fpi_device_get_current_action (device) == FPI_DEVICE_ACTION_VERIFY)
|
||||||
fpi_device_verify_report (device, FPI_MATCH_FAIL, NULL, error);
|
fpi_device_verify_report (device, matching ? FPI_MATCH_SUCCESS : FPI_MATCH_FAIL, new_scan, error);
|
||||||
else
|
else
|
||||||
fpi_device_identify_report (device, NULL, NULL, error);
|
fpi_device_identify_report (device, matching, new_scan, error);
|
||||||
}
|
|
||||||
|
|
||||||
fpi_ssm_next_state (self->task_ssm);
|
fpi_ssm_next_state (self->task_ssm);
|
||||||
|
|
||||||
@@ -764,9 +749,14 @@ fp_enroll_check_duplicate_cb (FpiDeviceGoodixMoc *self,
|
|||||||
}
|
}
|
||||||
if (resp->check_duplicate_resp.duplicate)
|
if (resp->check_duplicate_resp.duplicate)
|
||||||
{
|
{
|
||||||
|
g_autoptr(FpPrint) print = NULL;
|
||||||
|
|
||||||
|
print = g_object_ref_sink (fp_print_from_template (self, &resp->check_duplicate_resp.template));
|
||||||
|
|
||||||
fpi_ssm_mark_failed (self->task_ssm,
|
fpi_ssm_mark_failed (self->task_ssm,
|
||||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_DATA_DUPLICATE,
|
fpi_device_error_new_msg (FP_DEVICE_ERROR_DATA_DUPLICATE,
|
||||||
"Finger has already enrolled"));
|
"Finger was already enrolled as '%s'",
|
||||||
|
fp_print_get_description (print)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1170,6 +1160,32 @@ fp_template_delete_cb (FpiDeviceGoodixMoc *self,
|
|||||||
fp_info ("Successfully deleted enrolled user");
|
fp_info ("Successfully deleted enrolled user");
|
||||||
fpi_device_delete_complete (device, NULL);
|
fpi_device_delete_complete (device, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
fp_template_delete_all_cb (FpiDeviceGoodixMoc *self,
|
||||||
|
gxfp_cmd_response_t *resp,
|
||||||
|
GError *error)
|
||||||
|
{
|
||||||
|
FpDevice *device = FP_DEVICE (self);
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
fpi_device_clear_storage_complete (device, error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ((resp->result >= GX_FAILED) && (resp->result != GX_ERROR_FINGER_ID_NOEXIST))
|
||||||
|
{
|
||||||
|
fpi_device_clear_storage_complete (FP_DEVICE (self),
|
||||||
|
fpi_device_error_new_msg (FP_DEVICE_ERROR_GENERAL,
|
||||||
|
"Failed clear storage, result: 0x%x",
|
||||||
|
resp->result));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fp_info ("Successfully cleared storage");
|
||||||
|
fpi_device_clear_storage_complete (device, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* fp_template_list Function
|
* fp_template_list Function
|
||||||
@@ -1493,6 +1509,19 @@ gx_fp_template_delete (FpDevice *device)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gx_fp_template_delete_all (FpDevice *device)
|
||||||
|
{
|
||||||
|
FpiDeviceGoodixMoc *self = FPI_DEVICE_GOODIXMOC (device);
|
||||||
|
|
||||||
|
goodix_sensor_cmd (self, MOC_CMD0_DELETETEMPLATE, MOC_CMD1_DELETE_ALL,
|
||||||
|
false,
|
||||||
|
NULL,
|
||||||
|
0,
|
||||||
|
fp_template_delete_all_cb);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fpi_device_goodixmoc_init (FpiDeviceGoodixMoc *self)
|
fpi_device_goodixmoc_init (FpiDeviceGoodixMoc *self)
|
||||||
{
|
{
|
||||||
@@ -1536,6 +1565,7 @@ fpi_device_goodixmoc_class_init (FpiDeviceGoodixMocClass *klass)
|
|||||||
dev_class->probe = gx_fp_probe;
|
dev_class->probe = gx_fp_probe;
|
||||||
dev_class->enroll = gx_fp_enroll;
|
dev_class->enroll = gx_fp_enroll;
|
||||||
dev_class->delete = gx_fp_template_delete;
|
dev_class->delete = gx_fp_template_delete;
|
||||||
|
dev_class->clear_storage = gx_fp_template_delete_all;
|
||||||
dev_class->list = gx_fp_template_list;
|
dev_class->list = gx_fp_template_list;
|
||||||
dev_class->verify = gx_fp_verify_identify;
|
dev_class->verify = gx_fp_verify_identify;
|
||||||
dev_class->identify = gx_fp_verify_identify;
|
dev_class->identify = gx_fp_verify_identify;
|
||||||
|
|||||||
@@ -259,12 +259,9 @@ gx_proto_parse_fingerid (
|
|||||||
|
|
||||||
if (buffer[Offset++] != 67)
|
if (buffer[Offset++] != 67)
|
||||||
return -1;
|
return -1;
|
||||||
fid_buffer_size--;
|
|
||||||
|
|
||||||
template->type = buffer[Offset++];
|
template->type = buffer[Offset++];
|
||||||
fid_buffer_size--;
|
|
||||||
template->finger_index = buffer[Offset++];
|
template->finger_index = buffer[Offset++];
|
||||||
fid_buffer_size--;
|
|
||||||
Offset++;
|
Offset++;
|
||||||
memcpy (template->accountid, &buffer[Offset], sizeof (template->accountid));
|
memcpy (template->accountid, &buffer[Offset], sizeof (template->accountid));
|
||||||
Offset += sizeof (template->accountid);
|
Offset += sizeof (template->accountid);
|
||||||
@@ -273,6 +270,8 @@ gx_proto_parse_fingerid (
|
|||||||
template->payload.size = buffer[Offset++];
|
template->payload.size = buffer[Offset++];
|
||||||
if (template->payload.size > sizeof (template->payload.data))
|
if (template->payload.size > sizeof (template->payload.data))
|
||||||
return -1;
|
return -1;
|
||||||
|
if (template->payload.size + Offset > fid_buffer_size)
|
||||||
|
return -1;
|
||||||
memset (template->payload.data, 0, template->payload.size);
|
memset (template->payload.data, 0, template->payload.size);
|
||||||
memcpy (template->payload.data, &buffer[Offset], template->payload.size);
|
memcpy (template->payload.data, &buffer[Offset], template->payload.size);
|
||||||
|
|
||||||
@@ -365,9 +364,12 @@ gx_proto_parse_body (uint16_t cmd, uint8_t *buffer, uint16_t buffer_len, pgxfp_c
|
|||||||
if (buffer_len < 3)
|
if (buffer_len < 3)
|
||||||
return -1;
|
return -1;
|
||||||
uint16_t tid_size = GUINT16_FROM_LE (*(uint16_t *) (buffer + 1));
|
uint16_t tid_size = GUINT16_FROM_LE (*(uint16_t *) (buffer + 1));
|
||||||
if ((buffer_len < tid_size + 3) || (buffer_len > sizeof (template_format_t)) + 3)
|
offset += 3;
|
||||||
|
|
||||||
|
if (buffer_len < tid_size + offset)
|
||||||
|
return -1;
|
||||||
|
if (gx_proto_parse_fingerid (buffer + offset, tid_size, &presp->check_duplicate_resp.template) != 0)
|
||||||
return -1;
|
return -1;
|
||||||
memcpy (&presp->check_duplicate_resp.template, buffer + 3, tid_size);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -380,9 +382,12 @@ gx_proto_parse_body (uint16_t cmd, uint8_t *buffer, uint16_t buffer_len, pgxfp_c
|
|||||||
fingerlist = buffer + 2;
|
fingerlist = buffer + 2;
|
||||||
for(uint8_t num = 0; num < presp->finger_list_resp.finger_num; num++)
|
for(uint8_t num = 0; num < presp->finger_list_resp.finger_num; num++)
|
||||||
{
|
{
|
||||||
uint16_t fingerid_length = GUINT16_FROM_LE (*(uint16_t *) (fingerlist + offset));
|
uint16_t fingerid_length;
|
||||||
|
if (buffer_len < offset + 2)
|
||||||
|
return -1;
|
||||||
|
fingerid_length = GUINT16_FROM_LE (*(uint16_t *) (fingerlist + offset));
|
||||||
offset += 2;
|
offset += 2;
|
||||||
if (buffer_len < fingerid_length + offset + 2)
|
if (buffer_len < fingerid_length + offset)
|
||||||
return -1;
|
return -1;
|
||||||
if (gx_proto_parse_fingerid (fingerlist + offset,
|
if (gx_proto_parse_fingerid (fingerlist + offset,
|
||||||
fingerid_length,
|
fingerid_length,
|
||||||
@@ -405,7 +410,7 @@ gx_proto_parse_body (uint16_t cmd, uint8_t *buffer, uint16_t buffer_len, pgxfp_c
|
|||||||
presp->verify.match = (buffer[0] == 0) ? true : false;
|
presp->verify.match = (buffer[0] == 0) ? true : false;
|
||||||
if (presp->verify.match)
|
if (presp->verify.match)
|
||||||
{
|
{
|
||||||
if (buffer_len < sizeof (template_format_t) + 10)
|
if (buffer_len < 10)
|
||||||
return -1;
|
return -1;
|
||||||
offset += 1;
|
offset += 1;
|
||||||
presp->verify.rejectdetail = GUINT16_FROM_LE (*(uint16_t *) (buffer + offset));
|
presp->verify.rejectdetail = GUINT16_FROM_LE (*(uint16_t *) (buffer + offset));
|
||||||
@@ -416,6 +421,8 @@ gx_proto_parse_body (uint16_t cmd, uint8_t *buffer, uint16_t buffer_len, pgxfp_c
|
|||||||
offset += 1;
|
offset += 1;
|
||||||
fingerid_size = GUINT16_FROM_LE (*(uint16_t *) (buffer + offset));
|
fingerid_size = GUINT16_FROM_LE (*(uint16_t *) (buffer + offset));
|
||||||
offset += 2;
|
offset += 2;
|
||||||
|
if (buffer_len < fingerid_size + offset)
|
||||||
|
return -1;
|
||||||
if (gx_proto_parse_fingerid (buffer + offset, fingerid_size, &presp->verify.template) != 0)
|
if (gx_proto_parse_fingerid (buffer + offset, fingerid_size, &presp->verify.template) != 0)
|
||||||
{
|
{
|
||||||
presp->result = GX_FAILED;
|
presp->result = GX_FAILED;
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ static const FpIdEntry id_table[] = {
|
|||||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00F9, },
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00F9, },
|
||||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00FC, },
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00FC, },
|
||||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00C2, },
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00C2, },
|
||||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00C9, },
|
|
||||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0100, },
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0100, },
|
||||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00F0, },
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x00F0, },
|
||||||
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0103, },
|
{ .vid = SYNAPTICS_VENDOR_ID, .pid = 0x0103, },
|
||||||
|
|||||||
@@ -42,15 +42,19 @@ static const FpIdEntry whitelist_id_table[] = {
|
|||||||
{ .vid = 0x06cb, .pid = 0x009a },
|
{ .vid = 0x06cb, .pid = 0x009a },
|
||||||
{ .vid = 0x06cb, .pid = 0x009b },
|
{ .vid = 0x06cb, .pid = 0x009b },
|
||||||
{ .vid = 0x06cb, .pid = 0x00a2 },
|
{ .vid = 0x06cb, .pid = 0x00a2 },
|
||||||
|
{ .vid = 0x06cb, .pid = 0x00a8 },
|
||||||
{ .vid = 0x06cb, .pid = 0x00b7 },
|
{ .vid = 0x06cb, .pid = 0x00b7 },
|
||||||
{ .vid = 0x06cb, .pid = 0x00bb },
|
{ .vid = 0x06cb, .pid = 0x00bb },
|
||||||
{ .vid = 0x06cb, .pid = 0x00be },
|
{ .vid = 0x06cb, .pid = 0x00be },
|
||||||
{ .vid = 0x06cb, .pid = 0x00c4 },
|
{ .vid = 0x06cb, .pid = 0x00c4 },
|
||||||
{ .vid = 0x06cb, .pid = 0x00cb },
|
{ .vid = 0x06cb, .pid = 0x00cb },
|
||||||
|
{ .vid = 0x06cb, .pid = 0x00c9 },
|
||||||
{ .vid = 0x06cb, .pid = 0x00d8 },
|
{ .vid = 0x06cb, .pid = 0x00d8 },
|
||||||
{ .vid = 0x06cb, .pid = 0x00da },
|
{ .vid = 0x06cb, .pid = 0x00da },
|
||||||
|
{ .vid = 0x06cb, .pid = 0x00dc },
|
||||||
{ .vid = 0x06cb, .pid = 0x00e7 },
|
{ .vid = 0x06cb, .pid = 0x00e7 },
|
||||||
{ .vid = 0x06cb, .pid = 0x00e9 },
|
{ .vid = 0x06cb, .pid = 0x00e9 },
|
||||||
|
{ .vid = 0x06cb, .pid = 0x00fd },
|
||||||
{ .vid = 0x0a5c, .pid = 0x5801 },
|
{ .vid = 0x0a5c, .pid = 0x5801 },
|
||||||
{ .vid = 0x0a5c, .pid = 0x5805 },
|
{ .vid = 0x0a5c, .pid = 0x5805 },
|
||||||
{ .vid = 0x0a5c, .pid = 0x5834 },
|
{ .vid = 0x0a5c, .pid = 0x5834 },
|
||||||
@@ -62,6 +66,7 @@ static const FpIdEntry whitelist_id_table[] = {
|
|||||||
{ .vid = 0x0a5c, .pid = 0x5845 },
|
{ .vid = 0x0a5c, .pid = 0x5845 },
|
||||||
{ .vid = 0x0bda, .pid = 0x5812 },
|
{ .vid = 0x0bda, .pid = 0x5812 },
|
||||||
{ .vid = 0x10a5, .pid = 0x0007 },
|
{ .vid = 0x10a5, .pid = 0x0007 },
|
||||||
|
{ .vid = 0x10a5, .pid = 0x9200 },
|
||||||
{ .vid = 0x1188, .pid = 0x9545 },
|
{ .vid = 0x1188, .pid = 0x9545 },
|
||||||
{ .vid = 0x138a, .pid = 0x0007 },
|
{ .vid = 0x138a, .pid = 0x0007 },
|
||||||
{ .vid = 0x138a, .pid = 0x003a },
|
{ .vid = 0x138a, .pid = 0x003a },
|
||||||
@@ -79,6 +84,7 @@ static const FpIdEntry whitelist_id_table[] = {
|
|||||||
{ .vid = 0x16d1, .pid = 0x1027 },
|
{ .vid = 0x16d1, .pid = 0x1027 },
|
||||||
{ .vid = 0x1c7a, .pid = 0x0300 },
|
{ .vid = 0x1c7a, .pid = 0x0300 },
|
||||||
{ .vid = 0x1c7a, .pid = 0x0575 },
|
{ .vid = 0x1c7a, .pid = 0x0575 },
|
||||||
|
{ .vid = 0x1c7a, .pid = 0x0576 },
|
||||||
{ .vid = 0x27c6, .pid = 0x5042 },
|
{ .vid = 0x27c6, .pid = 0x5042 },
|
||||||
{ .vid = 0x27c6, .pid = 0x5110 },
|
{ .vid = 0x27c6, .pid = 0x5110 },
|
||||||
{ .vid = 0x27c6, .pid = 0x5117 },
|
{ .vid = 0x27c6, .pid = 0x5117 },
|
||||||
@@ -98,7 +104,9 @@ static const FpIdEntry whitelist_id_table[] = {
|
|||||||
{ .vid = 0x27c6, .pid = 0x55a4 },
|
{ .vid = 0x27c6, .pid = 0x55a4 },
|
||||||
{ .vid = 0x27c6, .pid = 0x55b4 },
|
{ .vid = 0x27c6, .pid = 0x55b4 },
|
||||||
{ .vid = 0x27c6, .pid = 0x5740 },
|
{ .vid = 0x27c6, .pid = 0x5740 },
|
||||||
|
{ .vid = 0x27c6, .pid = 0x5e0a },
|
||||||
{ .vid = 0x2808, .pid = 0x9338 },
|
{ .vid = 0x2808, .pid = 0x9338 },
|
||||||
|
{ .vid = 0x298d, .pid = 0x2020 },
|
||||||
{ .vid = 0x298d, .pid = 0x2033 },
|
{ .vid = 0x298d, .pid = 0x2033 },
|
||||||
{ .vid = 0x3538, .pid = 0x0930 },
|
{ .vid = 0x3538, .pid = 0x0930 },
|
||||||
{ .vid = 0 },
|
{ .vid = 0 },
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
project('libfprint', [ 'c', 'cpp' ],
|
project('libfprint', [ 'c', 'cpp' ],
|
||||||
version: '1.94.2',
|
version: '1.94.3',
|
||||||
license: 'LGPLv2.1+',
|
license: 'LGPLv2.1+',
|
||||||
default_options: [
|
default_options: [
|
||||||
'buildtype=debugoptimized',
|
'buildtype=debugoptimized',
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ assert d.has_feature(FPrint.DeviceFeature.DUPLICATES_CHECK)
|
|||||||
assert d.has_feature(FPrint.DeviceFeature.STORAGE)
|
assert d.has_feature(FPrint.DeviceFeature.STORAGE)
|
||||||
assert d.has_feature(FPrint.DeviceFeature.STORAGE_LIST)
|
assert d.has_feature(FPrint.DeviceFeature.STORAGE_LIST)
|
||||||
assert d.has_feature(FPrint.DeviceFeature.STORAGE_DELETE)
|
assert d.has_feature(FPrint.DeviceFeature.STORAGE_DELETE)
|
||||||
assert not d.has_feature(FPrint.DeviceFeature.STORAGE_CLEAR)
|
assert d.has_feature(FPrint.DeviceFeature.STORAGE_CLEAR)
|
||||||
|
|
||||||
d.open_sync()
|
d.open_sync()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user