mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
device: Add new FP_DEVICE_ERROR_UNTRUSTED error code
Throw a specific error when we are unable to verify the integrety of the device.
This commit is contained in:
committed by
Joshua Grisham
parent
4582b3b825
commit
ca89ead07d
@@ -143,6 +143,7 @@ typedef enum {
|
|||||||
* @FP_DEVICE_ERROR_DATA_DUPLICATE: Enrolling template duplicates storaged templates
|
* @FP_DEVICE_ERROR_DATA_DUPLICATE: Enrolling template duplicates storaged templates
|
||||||
* @FP_DEVICE_ERROR_REMOVED: The device has been removed.
|
* @FP_DEVICE_ERROR_REMOVED: The device has been removed.
|
||||||
* @FP_DEVICE_ERROR_TOO_HOT: The device might be getting too hot
|
* @FP_DEVICE_ERROR_TOO_HOT: The device might be getting too hot
|
||||||
|
* @FP_DEVICE_ERROR_UNTRUSTED: Device cannot be trusted
|
||||||
*
|
*
|
||||||
* Error codes for device operations. More specific errors from other domains
|
* Error codes for device operations. More specific errors from other domains
|
||||||
* such as #G_IO_ERROR or #G_USB_DEVICE_ERROR may also be reported.
|
* such as #G_IO_ERROR or #G_USB_DEVICE_ERROR may also be reported.
|
||||||
@@ -161,6 +162,7 @@ typedef enum {
|
|||||||
/* Leave some room to add more DATA related errors */
|
/* Leave some room to add more DATA related errors */
|
||||||
FP_DEVICE_ERROR_REMOVED = 0x100,
|
FP_DEVICE_ERROR_REMOVED = 0x100,
|
||||||
FP_DEVICE_ERROR_TOO_HOT,
|
FP_DEVICE_ERROR_TOO_HOT,
|
||||||
|
FP_DEVICE_ERROR_UNTRUSTED,
|
||||||
} FpDeviceError;
|
} FpDeviceError;
|
||||||
|
|
||||||
GQuark fp_device_retry_quark (void);
|
GQuark fp_device_retry_quark (void);
|
||||||
|
|||||||
@@ -190,6 +190,9 @@ fpi_device_error_new (FpDeviceError error)
|
|||||||
|
|
||||||
case FP_DEVICE_ERROR_TOO_HOT:
|
case FP_DEVICE_ERROR_TOO_HOT:
|
||||||
msg = "Device disabled to prevent overheating.";
|
msg = "Device disabled to prevent overheating.";
|
||||||
|
|
||||||
|
case FP_DEVICE_ERROR_UNTRUSTED:
|
||||||
|
msg = "Could not verify integrity of the device, it cannot be trusted!";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user