Skip to content

Android Integration - 3 party dynamic TA #12

@vamanea

Description

@vamanea

Hi Guys,

I our Android integration I found that having one OpenTEE instance for every application was not very convenient. One instance in the system is much more convenient. However the problem here is that to provide a proper SDK for 3rd party developers there is a need to allow the developer to dynamically load the TA he just built.
With this in mind I developed some patches that allow the developer to only embed the TA inside the APK and be able to load it through TEEC_OpenSession. The code looks something like this:

    session.ta_path = alloca(strlen(filename) + 1);
    memset(session.ta_path, 0, strlen(filename) + 1);
    strncpy(session.ta_path, filename, strlen(filename));

    TEE_Debug("Opening session to TA %s", session.ta_path);
    result = TEEC_OpenSession(&context, &session, &EXAMPLE_uuid,
        TEEC_LOGIN_PUBLIC, NULL, NULL, NULL);

    if(result != TEEC_SUCCESS) {
        TEE_Error("teec open session failed\n");
        goto cleanup;
    }

Where filename is a path from the JAVA side. This allowed us to have much simpler OpenTEE Android SDK and integration.

Now I was wondering if you are interested in pursuing this further to integrate said patches.

Regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions