diff options
-rwxr-xr-x | device.mk | 4 | ||||
-rw-r--r-- | keymaster/Android.mk | 2 | ||||
-rw-r--r-- | keymaster/keymaster_tuna.cpp | 12 |
3 files changed, 10 insertions, 8 deletions
@@ -62,8 +62,8 @@ PRODUCT_PACKAGES += \ PRODUCT_PROPERTY_OVERRIDES += \ media.aac_51_output_enabled=true -#PRODUCT_PACKAGES += \ -# keystore.tuna +PRODUCT_PACKAGES += \ + keystore.tuna # Init files PRODUCT_COPY_FILES += \ diff --git a/keymaster/Android.mk b/keymaster/Android.mk index 885812f..10846df 100644 --- a/keymaster/Android.mk +++ b/keymaster/Android.mk @@ -29,7 +29,7 @@ LOCAL_SRC_FILES := \ LOCAL_C_INCLUDES := \ libcore/include \ external/openssl/include \ - hardware/ti/omap4xxx/security/tf_sdk/include + hardware/ti/omap4/security/tf_sdk/include LOCAL_CFLAGS := -fvisibility=hidden -Wall -Werror diff --git a/keymaster/keymaster_tuna.cpp b/keymaster/keymaster_tuna.cpp index 4385f23..1c31355 100644 --- a/keymaster/keymaster_tuna.cpp +++ b/keymaster/keymaster_tuna.cpp @@ -25,7 +25,7 @@ #include <cutils/log.h> #include <hardware/hardware.h> -#include <hardware/keymaster.h> +#include <hardware/keymaster0.h> #include <openssl/bn.h> #include <openssl/err.h> @@ -38,6 +38,8 @@ #include <UniquePtr.h> +typedef keymaster0_device keymaster_device_t; +typedef keymaster0_device keymaster_device; /** The size of a key ID in bytes */ #define ID_LENGTH 32 @@ -219,7 +221,7 @@ static ByteArray* bignum_to_array(const BIGNUM* bn) { Unique_CK_BYTE bytes(new CK_BYTE[bignumSize]); unsigned char* tmp = reinterpret_cast<unsigned char*>(bytes.get()); - if (BN_bn2bin(bn, tmp) != bignumSize) { + if (int(BN_bn2bin(bn, tmp)) != bignumSize) { ALOGE("public exponent size wasn't what was expected"); return NULL; } @@ -606,7 +608,7 @@ static int tee_import_keypair(const keymaster_device_t* dev, return keyblob_save(objId.get(), key_blob, key_blob_length); } -static int tee_get_keypair_public(const struct keymaster_device* dev, +static int tee_get_keypair_public(const keymaster_device* dev, const uint8_t* key_blob, const size_t key_blob_length, uint8_t** x509_data, size_t* x509_data_length) { @@ -708,7 +710,7 @@ static int tee_get_keypair_public(const struct keymaster_device* dev, return 0; } -static int tee_delete_keypair(const struct keymaster_device* dev, +static int tee_delete_keypair(const keymaster_device* dev, const uint8_t* key_blob, const size_t key_blob_length) { CryptoSession session(reinterpret_cast<CK_SESSION_HANDLE>(dev->context)); @@ -896,7 +898,7 @@ static int tee_open(const hw_module_t* module, const char* name, dev->common.version = 1; dev->common.module = (struct hw_module_t*) module; dev->common.close = tee_close; - dev->flags = 0; + dev->flags = KEYMASTER_BLOBS_ARE_STANDALONE; dev->generate_keypair = tee_generate_keypair; dev->import_keypair = tee_import_keypair; |