#include <stdint.h>
#include <hardware/hardware.h>
-#include <hardware/keymaster.h>
+#include <hardware/keymaster0.h>
#include <openssl/evp.h>
#include <openssl/bio.h>
};
typedef UniquePtr<RSA, RSA_Delete> Unique_RSA;
-typedef UniquePtr<keymaster_device_t> Unique_keymaster_device_t;
+typedef UniquePtr<keymaster0_device_t> Unique_keymaster_device_t;
/**
* Many OpenSSL APIs take ownership of an argument on success but don't free the argument
ERR_remove_state(0);
}
-static int exynos_km_generate_keypair(const keymaster_device_t* dev,
+static int exynos_km_generate_keypair(const keymaster0_device_t* dev,
const keymaster_keypair_t key_type, const void* key_params,
uint8_t** keyBlob, size_t* keyBlobLength) {
teeResult_t ret = TEE_ERR_NONE;
return 0;
}
-static int exynos_km_import_keypair(const keymaster_device_t* dev,
+static int exynos_km_import_keypair(const keymaster0_device_t* dev,
const uint8_t* key, const size_t key_length,
uint8_t** key_blob, size_t* key_blob_length) {
uint8_t kbuf[RSA_KEY_BUFFER_SIZE];
return 0;
}
-static int exynos_km_get_keypair_public(const struct keymaster_device* dev,
+static int exynos_km_get_keypair_public(const keymaster0_device_t* dev,
const uint8_t* key_blob, const size_t key_blob_length,
uint8_t** x509_data, size_t* x509_data_length) {
uint32_t bin_mod_len;
return 0;
}
-static int exynos_km_sign_data(const keymaster_device_t* dev,
+static int exynos_km_sign_data(const keymaster0_device_t* dev,
const void* params,
const uint8_t* keyBlob, const size_t keyBlobLength,
const uint8_t* data, const size_t dataLength,
return 0;
}
-static int exynos_km_verify_data(const keymaster_device_t* dev,
+static int exynos_km_verify_data(const keymaster0_device_t* dev,
const void* params,
const uint8_t* keyBlob, const size_t keyBlobLength,
const uint8_t* signedData, const size_t signedDataLength,
if (strcmp(name, KEYSTORE_KEYMASTER) != 0)
return -EINVAL;
- Unique_keymaster_device_t dev(new keymaster_device_t);
+ Unique_keymaster_device_t dev(new keymaster0_device_t);
if (dev.get() == NULL)
return -ENOMEM;