keymaster: update proto definitions
The previous commit was missing some
fields, add them in.
Change-Id: If4e65bac03a8b28ef2d29afd1ab8fd184a8fb2b3
diff --git a/nugget/services/keymaster/keymaster.proto b/nugget/services/keymaster/keymaster.proto
index 7a962e2..5339ca9 100644
--- a/nugget/services/keymaster/keymaster.proto
+++ b/nugget/services/keymaster/keymaster.proto
@@ -100,7 +100,7 @@
}
message OperationHandle {
- bytes handle = 1;
+ uint64 handle = 1;
}
message Certificate {
@@ -123,15 +123,19 @@
message AddRngEntropyRequest {
bytes data = 1;
}
-message AddRngEntropyResponse {}
+message AddRngEntropyResponse {
+ // TODO: replace with ErrorCode enum
+ uint32 error_code = 1;
+}
// GenerateKey
message GenerateKeyRequest {
KeyParameters params = 1;
}
message GenerateKeyResponse {
- KeyBlob blob = 1;
- KeyCharacteristics characteristics = 2;
+ uint32 error_code = 1;
+ KeyBlob blob = 2;
+ KeyCharacteristics characteristics = 3;
}
// GetKeyCharacteristics
@@ -141,7 +145,8 @@
bytes app_data = 3;
}
message GetKeyCharacteristicsResponse {
- KeyCharacteristics characteristics = 1;
+ uint32 error_code = 1;
+ KeyCharacteristics characteristics = 2;
}
// ImportKey
@@ -152,8 +157,10 @@
SymmetricKey symmetric_key = 4;
};
message ImportKeyResponse {
- KeyBlob blob = 1;
- KeyCharacteristics characteristics = 2;
+ // TODO: include an ErrorCode field
+ uint32 error_code = 1;
+ KeyBlob blob = 2;
+ KeyCharacteristics characteristics = 3;
};
// ExportKey
@@ -164,7 +171,8 @@
bytes app_data = 4;
};
message ExportKeyResponse {
- bytes key_material = 1;
+ uint32 error_code = 1;
+ bytes key_material = 2;
};
// AttestKey
@@ -173,7 +181,8 @@
KeyParameters params = 2;
}
message AttestKeyResponse {
- CertificateChain chain = 1;
+ uint32 error_code = 1;
+ CertificateChain chain = 2;
}
// UpgradeKey
@@ -182,22 +191,29 @@
KeyParameters params = 2;
}
message UpgradeKeyResponse {
- KeyBlob blob = 1;
+ uint32 error_code = 1;
+ KeyBlob blob = 2;
}
// DeleteKey
message DeleteKeyRequest {
KeyBlob blob = 1;
}
-message DeleteKeyResponse {}
+message DeleteKeyResponse {
+ uint32 error_code = 1;
+}
// DeleteAllKeys
message DeleteAllKeysRequest {}
-message DeleteAllKeysResponse {}
+message DeleteAllKeysResponse {
+ uint32 error_code = 1;
+}
// DestroyAttestationIds
message DestroyAttestationIdsRequest {}
-message DestroyAttestationIdsResponse {}
+message DestroyAttestationIdsResponse {
+ uint32 error_code = 1;
+}
// BeginOperation
message BeginOperationRequest {
@@ -206,8 +222,9 @@
KeyParameters params = 3;
}
message BeginOperationResponse {
- KeyParameters params = 1;
- OperationHandle handle = 2;
+ uint32 error_code = 1;
+ KeyParameters params = 2;
+ OperationHandle handle = 3;
}
// UpdateOperation
@@ -217,9 +234,10 @@
bytes input = 3;
}
message UpdateOperationResponse {
- uint32 consumed = 1;
- KeyParameters params = 2;
- bytes output = 3;
+ uint32 error_code = 1;
+ uint32 consumed = 2;
+ KeyParameters params = 3;
+ bytes output = 4;
}
// FinishOperation
@@ -227,17 +245,21 @@
OperationHandle handle = 1;
KeyParameters params = 2;
bytes input = 3;
+ bytes signature = 4;
};
message FinishOperationResponse {
- KeyParameters params = 1;
- bytes output = 2;
+ uint32 error_code = 1;
+ KeyParameters params = 2;
+ bytes output = 3;
};
// AbortOperation
message AbortOperationRequest {
OperationHandle handle = 1;
};
-message AbortOperationResponse {};
+message AbortOperationResponse {
+ uint32 error_code = 1;
+};
/*
* KM4 messages.
@@ -248,8 +270,9 @@
}
message ImportWrappedKeyResponse {
- KeyBlob blob = 1;
- KeyCharacteristics characteristics = 2;
+ uint32 error_code = 1;
+ KeyBlob blob = 2;
+ KeyCharacteristics characteristics = 3;
}