From e881b2cabd5a2ca1fd22a9d548dbd00cc28314a6 Mon Sep 17 00:00:00 2001 From: Tejasv Sharma Date: Mon, 22 May 2023 16:32:15 +0530 Subject: [PATCH] feat: add device auth error message --- proto/manager/auth_device.proto | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/proto/manager/auth_device.proto b/proto/manager/auth_device.proto index 434addc..8ddcd29 100644 --- a/proto/manager/auth_device.proto +++ b/proto/manager/auth_device.proto @@ -24,6 +24,18 @@ package manager; * AuthDeviceResult => */ +/** + * Example of error in authentication + * + * Host Device + * AuthDeviceInitiateRequest => + * <= AuthDeviceChallengeSigResponse + * ------------------------------------------------ + * <= AuthDeviceSerialSigResponse + * AuthDeviceResult => + * <= AuthDeviceChallengeSigResponse + */ + enum AuthDeviceStatus { AUTH_DEVICE_STATUS_INIT = 0; AUTH_DEVICE_STATUS_USER_CONFIRMED = 1; @@ -63,11 +75,22 @@ message AuthDeviceRequest { } } +enum AuthDeviceErrorType { + AUTH_DEVICE_ERROR_TYPE_NONE = 0; + ATECC_RETRIES_EXCEEDED = 1; + SIGNATURE_VERIFICATION_FAILED = 2; +} + +message AuthDeviceErrorResponse { + AuthDeviceErrorType type = 1 ; +} + message AuthDeviceResponse { oneof response { AuthDeviceSerialSigResponse serial_signature = 1; AuthDeviceChallengeSigResponse challenge_signature = 2; error.CommonError common_error = 3; + AuthDeviceErrorResponse error = 4; } }