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:
parent
4a8ab83a13
commit
2d7f2c67bf
2 changed files with 6 additions and 0 deletions
|
@ -118,6 +118,7 @@ typedef enum {
|
|||
* @FP_DEVICE_ERROR_DATA_FULL: No space on device available for operation
|
||||
* @FP_DEVICE_ERROR_DATA_DUPLICATE: Enrolling template duplicates storaged templates
|
||||
* @FP_DEVICE_ERROR_REMOVED: The device has been removed.
|
||||
* @FP_DEVICE_ERROR_UNTRUSTED: Device cannot be trusted
|
||||
*
|
||||
* 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.
|
||||
|
@ -135,6 +136,7 @@ typedef enum {
|
|||
FP_DEVICE_ERROR_DATA_DUPLICATE,
|
||||
/* Leave some room to add more DATA related errors */
|
||||
FP_DEVICE_ERROR_REMOVED = 0x100,
|
||||
FP_DEVICE_ERROR_UNTRUSTED,
|
||||
} FpDeviceError;
|
||||
|
||||
GQuark fp_device_retry_quark (void);
|
||||
|
|
|
@ -177,6 +177,10 @@ fpi_device_error_new (FpDeviceError error)
|
|||
msg = "This device has been removed from the system.";
|
||||
break;
|
||||
|
||||
case FP_DEVICE_ERROR_UNTRUSTED:
|
||||
msg = "Could not verify integrity of the device, it cannot be trusted!";
|
||||
break;
|
||||
|
||||
default:
|
||||
g_warning ("Unsupported error, returning general error instead!");
|
||||
error = FP_DEVICE_ERROR_GENERAL;
|
||||
|
|
Loading…
Reference in a new issue