keymaster: replace uint32 with ErrorCode enum

The response error_code used to be an int,
replace with an enum since this is what it is.

Change-Id: Id4b034824a6718b5217d554b06e52a2e8eaa55db
diff --git a/nugget/proto/nugget/app/keymaster/keymaster.proto b/nugget/proto/nugget/app/keymaster/keymaster.proto
index 0edf748..65f7b3b 100644
--- a/nugget/proto/nugget/app/keymaster/keymaster.proto
+++ b/nugget/proto/nugget/app/keymaster/keymaster.proto
@@ -86,8 +86,7 @@
   bytes data = 1;
 }
 message AddRngEntropyResponse {
-  // TODO: replace with ErrorCode enum
-  uint32 error_code = 1;
+  ErrorCode error_code = 1;
 }
 
 // GenerateKey
@@ -95,7 +94,7 @@
   KeyParameters params = 1;
 }
 message GenerateKeyResponse {
-  uint32 error_code = 1;
+  ErrorCode error_code = 1;
   KeyBlob blob = 2;
   KeyCharacteristics characteristics = 3;
 }
@@ -107,7 +106,7 @@
   bytes app_data = 3;
 }
 message GetKeyCharacteristicsResponse {
-  uint32 error_code = 1;
+  ErrorCode error_code = 1;
   KeyCharacteristics characteristics = 2;
 }
 
@@ -119,7 +118,7 @@
   SymmetricKey symmetric_key = 4;
 };
 message ImportKeyResponse {
-  uint32 error_code = 1;
+  ErrorCode error_code = 1;
   KeyBlob blob = 2;
   KeyCharacteristics characteristics = 3;
 };
@@ -132,7 +131,7 @@
   bytes app_data = 4;
 };
 message ExportKeyResponse {
-  uint32 error_code = 1;
+  ErrorCode error_code = 1;
   bytes key_material = 2;
 };
 
@@ -142,7 +141,7 @@
   KeyParameters params = 2;
 }
 message AttestKeyResponse {
-  uint32 error_code = 1;
+  ErrorCode error_code = 1;
   CertificateChain chain = 2;
 }
 
@@ -152,7 +151,7 @@
   KeyParameters params = 2;
 }
 message UpgradeKeyResponse {
-  uint32 error_code = 1;
+  ErrorCode error_code = 1;
   KeyBlob blob = 2;
 }
 
@@ -161,19 +160,19 @@
   KeyBlob blob = 1;
 }
 message DeleteKeyResponse {
-  uint32 error_code = 1;
+  ErrorCode error_code = 1;
 }
 
 // DeleteAllKeys
 message DeleteAllKeysRequest {}
 message DeleteAllKeysResponse {
-  uint32 error_code = 1;
+  ErrorCode error_code = 1;
 }
 
 // DestroyAttestationIds
 message DestroyAttestationIdsRequest {}
 message DestroyAttestationIdsResponse {
-  uint32 error_code = 1;
+  ErrorCode error_code = 1;
 }
 
 // BeginOperation
@@ -183,7 +182,7 @@
   KeyParameters params = 3;
 }
 message BeginOperationResponse {
-  uint32 error_code = 1;
+  ErrorCode error_code = 1;
   KeyParameters params = 2;
   OperationHandle handle = 3;
 }
@@ -195,7 +194,7 @@
   bytes input = 3;
 }
 message UpdateOperationResponse {
-  uint32 error_code = 1;
+  ErrorCode error_code = 1;
   uint32 consumed = 2;
   KeyParameters params = 3;
   bytes output = 4;
@@ -209,7 +208,7 @@
   bytes signature = 4;
 };
 message FinishOperationResponse {
-  uint32 error_code = 1;
+  ErrorCode error_code = 1;
   KeyParameters params = 2;
   bytes output = 3;
 };
@@ -219,7 +218,7 @@
   OperationHandle handle = 1;
 };
 message AbortOperationResponse {
-  uint32 error_code = 1;
+  ErrorCode error_code = 1;
 };
 
 /*
@@ -251,7 +250,7 @@
 }
 message SetRootOfTrustResponse {
   // Specified in keymaster_defs.proto:ErrorCode
-  uint32 error_code = 1;
+  ErrorCode error_code = 1;
 }
 
 // SetBootStateRequest
@@ -265,5 +264,5 @@
 }
 message SetBootStateResponse {
   // Specified in keymaster_defs.proto:ErrorCode
-  uint32 error_code = 1;
+  ErrorCode error_code = 1;
 }
\ No newline at end of file