Add Keymaster 1.0 binder methods
Add all the serialization required for the new keystore binder API to
support keymaster 1.0. The keystore methods themselves are left as
stubs, will be filled in in later commits.
Change-Id: Ibb5855dba879ae35c375c087c54d1bcdca53163f
diff --git a/keystore/keystore.cpp b/keystore/keystore.cpp
index 194b87c..cf799f1 100644
--- a/keystore/keystore.cpp
+++ b/keystore/keystore.cpp
@@ -2433,6 +2433,56 @@
return ::SYSTEM_ERROR;
}
+ int32_t addRngEntropy(const uint8_t* /*data*/, size_t /*dataLength*/) {
+ return KM_ERROR_UNIMPLEMENTED;
+ }
+
+ int32_t generateKey(const String16& /*name*/, const KeymasterArguments& /*params*/,
+ int /*uid*/, int /*flags*/, KeyCharacteristics* /*outCharacteristics*/) {
+ return KM_ERROR_UNIMPLEMENTED;
+ }
+
+ int32_t getKeyCharacteristics(const String16& /*name*/,
+ const keymaster_blob_t& /*clientId*/,
+ const keymaster_blob_t& /*appData*/,
+ KeyCharacteristics* /*outCharacteristics*/) {
+ return KM_ERROR_UNIMPLEMENTED;
+ }
+
+ int32_t importKey(const String16& /*name*/, const KeymasterArguments& /*params*/,
+ keymaster_key_format_t /*format*/, const uint8_t* /*keyData*/,
+ size_t /*keyLength*/, int /*uid*/, int /*flags*/,
+ KeyCharacteristics* /*outCharacteristics*/) {
+ return KM_ERROR_UNIMPLEMENTED;
+ }
+
+ void exportKey(const String16& /*name*/, keymaster_key_format_t /*format*/,
+ const keymaster_blob_t& /*clientId*/,
+ const keymaster_blob_t& /*appData*/, ExportResult* result) {
+ result->resultCode = KM_ERROR_UNIMPLEMENTED;
+ }
+
+ void begin(const sp<IBinder>& /*appToken*/, const String16& /*name*/,
+ keymaster_purpose_t /*purpose*/, bool /*pruneable*/,
+ const KeymasterArguments& /*params*/, KeymasterArguments* /*outParams*/,
+ OperationResult* result) {
+ result->resultCode = KM_ERROR_UNIMPLEMENTED;
+ }
+
+ void update(const sp<IBinder>& /*token*/, const KeymasterArguments& /*params*/,
+ uint8_t* /*data*/, size_t /*dataLength*/, OperationResult* result) {
+ result->resultCode = KM_ERROR_UNIMPLEMENTED;
+ }
+
+ void finish(const sp<IBinder>& /*token*/, const KeymasterArguments& /*args*/,
+ uint8_t* /*signature*/, size_t /*signatureLength*/, OperationResult* result) {
+ result->resultCode = KM_ERROR_UNIMPLEMENTED;
+ }
+
+ int32_t abort(const sp<IBinder>& /*token*/) {
+ return KM_ERROR_UNIMPLEMENTED;
+ }
+
private:
inline bool isKeystoreUnlocked(State state) {
switch (state) {